-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
680 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ | ||
import React from 'react'; | ||
import { PrismCode } from 'react-prism'; | ||
import Helmet from 'react-helmet'; | ||
import NavsExample from '../examples/Navs'; | ||
const NavsExampleSource = require('!!raw!../examples/Navs.jsx'); | ||
import NavInlineExample from '../examples/NavInline'; | ||
const NavInlineExampleSource = require('!!raw!../examples/NavInline.jsx'); | ||
import NavTabsExample from '../examples/NavTabs'; | ||
const NavTabsExampleSource = require('!!raw!../examples/NavTabs.jsx'); | ||
import NavPillsExample from '../examples/NavPills'; | ||
const NavPillsExampleSource = require('!!raw!../examples/NavPills.jsx'); | ||
|
||
export default class NavssPage extends React.Component { | ||
render() { | ||
return ( | ||
<div> | ||
<Helmet title="Nav Components"/> | ||
<h3>Navs</h3> | ||
<div className="docs-example"> | ||
<NavsExample/> | ||
</div> | ||
<pre> | ||
<PrismCode className="language-jsx"> | ||
{NavsExampleSource} | ||
</PrismCode> | ||
</pre> | ||
<h4>Nav Properties</h4> | ||
<pre> | ||
<PrismCode className="language-jsx"> | ||
{`Nav.propTypes = { | ||
inline: PropTypes.bool, | ||
disabled: PropTypes.bool, | ||
tabs: PropTypes.bool, | ||
pills: PropTypes.bool, | ||
stacked: PropTypes.bool, | ||
navbar: PropTypes.bool, | ||
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]) | ||
// pass in custom element to use | ||
}`} | ||
</PrismCode> | ||
</pre> | ||
<h4>NavItem Properties</h4> | ||
<pre> | ||
<PrismCode className="language-jsx"> | ||
{`NavItem.propTypes = { | ||
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]) | ||
// pass in custom element to use | ||
}`} | ||
</PrismCode> | ||
</pre> | ||
<h4>NavLink Properties</h4> | ||
<pre> | ||
<PrismCode className="language-jsx"> | ||
{`NavLink.propTypes = { | ||
disabled: PropTypes.bool, | ||
active: PropTypes.bool, | ||
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]) | ||
// pass in custom element to use | ||
}`} | ||
</PrismCode> | ||
</pre> | ||
<h4>NavDropdown Properties</h4> | ||
<pre> | ||
<PrismCode className="language-jsx"> | ||
{`NavDropdown.propTypes = { | ||
disabled: PropTypes.bool, | ||
dropup: PropTypes.bool, | ||
group: PropTypes.bool, | ||
isOpen: PropTypes.bool, | ||
tag: PropTypes.string, | ||
tether: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]), | ||
toggle: PropTypes.func | ||
};`} | ||
</PrismCode> | ||
</pre> | ||
<h3>Inline</h3> | ||
<div className="docs-example"> | ||
<NavInlineExample/> | ||
</div> | ||
<pre> | ||
<PrismCode className="language-jsx"> | ||
{NavInlineExampleSource} | ||
</PrismCode> | ||
</pre> | ||
<h3>Tabs</h3> | ||
<div className="docs-example"> | ||
<NavTabsExample/> | ||
</div> | ||
<pre> | ||
<PrismCode className="language-jsx"> | ||
{NavTabsExampleSource} | ||
</PrismCode> | ||
</pre> | ||
<h3>Pills</h3> | ||
<div className="docs-example"> | ||
<NavPillsExample/> | ||
</div> | ||
<pre> | ||
<PrismCode className="language-jsx"> | ||
{NavPillsExampleSource} | ||
</PrismCode> | ||
</pre> | ||
</div> | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react'; | ||
import { Nav, NavItem, NavLink } from 'reactstrap'; | ||
|
||
export default class Example extends React.Component { | ||
render() { | ||
return ( | ||
<div> | ||
<p>List Based</p> | ||
<Nav inline> | ||
<NavItem> | ||
<NavLink href="#">Link</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink href="#">Link</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink href="#">Another Link</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink disabled href="#">Disabled Link</NavLink> | ||
</NavItem> | ||
</Nav> | ||
<hr/> | ||
<p>Link based</p> | ||
<Nav inline> | ||
<NavLink href="#">Link</NavLink> <NavLink href="#">Link</NavLink> <NavLink href="#">Another Link</NavLink> <NavLink disabled href="#">Disabled Link</NavLink> | ||
</Nav> | ||
</div> | ||
); | ||
} | ||
} |
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,52 @@ | ||
import React from 'react'; | ||
import { Nav, NavItem, NavDropdown, DropdownItem, DropdownToggle, DropdownMenu, NavLink } from 'reactstrap'; | ||
|
||
export default class Example extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
|
||
this.toggle = this.toggle.bind(this); | ||
this.state = { | ||
dropdownOpen: false | ||
}; | ||
} | ||
|
||
toggle() { | ||
this.setState({ | ||
dropdownOpen: !this.state.dropdownOpen | ||
}); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<Nav pills> | ||
<NavItem> | ||
<NavLink href="#" active>Link</NavLink> | ||
</NavItem> | ||
<NavDropdown isOpen={this.state.dropdownOpen} toggle={this.toggle}> | ||
<DropdownToggle caret> | ||
<NavLink href="#">Dropdown</NavLink> | ||
</DropdownToggle> | ||
<DropdownMenu> | ||
<DropdownItem header>Header</DropdownItem> | ||
<DropdownItem disabled>Action</DropdownItem> | ||
<DropdownItem>Another Action</DropdownItem> | ||
<DropdownItem divider/> | ||
<DropdownItem>Another Action</DropdownItem> | ||
</DropdownMenu> | ||
</NavDropdown> | ||
<NavItem> | ||
<NavLink href="#">Link</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink href="#">Another Link</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink disabled href="#">Disabled Link</NavLink> | ||
</NavItem> | ||
</Nav> | ||
</div> | ||
); | ||
} | ||
} |
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,52 @@ | ||
import React from 'react'; | ||
import { Nav, NavItem, NavDropdown, DropdownItem, DropdownToggle, DropdownMenu, NavLink } from 'reactstrap'; | ||
|
||
export default class Example extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
|
||
this.toggle = this.toggle.bind(this); | ||
this.state = { | ||
dropdownOpen: false | ||
}; | ||
} | ||
|
||
toggle() { | ||
this.setState({ | ||
dropdownOpen: !this.state.dropdownOpen | ||
}); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<Nav tabs> | ||
<NavItem> | ||
<NavLink href="#" active>Link</NavLink> | ||
</NavItem> | ||
<NavDropdown isOpen={this.state.dropdownOpen} toggle={this.toggle}> | ||
<DropdownToggle caret> | ||
<NavLink href="#">Dropdown</NavLink> | ||
</DropdownToggle> | ||
<DropdownMenu> | ||
<DropdownItem header>Header</DropdownItem> | ||
<DropdownItem disabled>Action</DropdownItem> | ||
<DropdownItem>Another Action</DropdownItem> | ||
<DropdownItem divider/> | ||
<DropdownItem>Another Action</DropdownItem> | ||
</DropdownMenu> | ||
</NavDropdown> | ||
<NavItem> | ||
<NavLink href="#">Link</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink href="#">Another Link</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink disabled href="#">Disabled Link</NavLink> | ||
</NavItem> | ||
</Nav> | ||
</div> | ||
); | ||
} | ||
} |
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,31 @@ | ||
import React from 'react'; | ||
import { Nav, NavItem, NavLink } from 'reactstrap'; | ||
|
||
export default class Example extends React.Component { | ||
render() { | ||
return ( | ||
<div> | ||
<p>List Based</p> | ||
<Nav> | ||
<NavItem> | ||
<NavLink href="#">Link</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink href="#">Link</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink href="#">Another Link</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink disabled href="#">Disabled Link</NavLink> | ||
</NavItem> | ||
</Nav> | ||
<hr/> | ||
<p>Link Based</p> | ||
<Nav> | ||
<NavLink href="#">Link</NavLink> <NavLink href="#">Link</NavLink> <NavLink href="#">Another Link</NavLink> <NavLink disabled href="#">Disabled Link</NavLink> | ||
</Nav> | ||
</div> | ||
); | ||
} | ||
} |
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
Oops, something went wrong.