-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💥 feat: Many problems have been solved
- Loading branch information
Showing
38 changed files
with
284 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export { | ||
Navbar, | ||
NavbarProps, | ||
Nav, | ||
NavProps, | ||
Collapse, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/lib/nav/collapse/collapse.md → src/lib/navbar/collapse/collapse.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
```tsx padded | ||
import { Nav, Collapse, Item, Items } from '../../' | ||
import { Navbar, Collapse, Item, Items } from '../../' | ||
import classnames from 'classnames' | ||
;<Nav className={classnames('navbar-light')}> | ||
;<Navbar className={classnames('navbar-light')}> | ||
<Collapse> | ||
<Items href={'#about'} title="About"> | ||
<Item href={'#introduction'}>Introduction</Item> | ||
</Items> | ||
</Collapse> | ||
</Nav> | ||
</Navbar> | ||
``` |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React, { useState } from 'react' | ||
import CollapseProps from './collapse.props' | ||
import classNames from 'classnames' | ||
import './collapse.less' | ||
import Nav from '../nav/nav' | ||
|
||
/** | ||
* A generic Collapse | ||
* @returns Element | ||
*/ | ||
function Collapse (props: CollapseProps): JSX.Element { | ||
const [isCollapsed, setIsCollapsed] = useState(true) | ||
return ( | ||
<> | ||
<div onClick={() => { setIsCollapsed(!isCollapsed) }} className={classNames('navbar-toggler', { collapsed: !isCollapsed })}> | ||
<span className={classNames('navbar-toggler-line')} /> | ||
<span className={classNames('navbar-toggler-line')} /> | ||
<span className={classNames('navbar-toggler-line')} /> | ||
</div> | ||
<Nav collapsed={isCollapsed}> | ||
{props.children} | ||
</Nav> | ||
</> | ||
) | ||
} | ||
|
||
export default Collapse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
```tsx padded | ||
import { Nav, Collapse, Item } from '../../' | ||
import { Navbar, Collapse, Item } from '../../' | ||
import classnames from 'classnames' | ||
;<Nav className={classnames('navbar-light')}> | ||
;<Navbar className={classnames('navbar-light')}> | ||
<Collapse> | ||
<Item href={'#home'}>Home</Item> | ||
</Collapse> | ||
</Nav> | ||
</Navbar> | ||
``` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.