-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #209 from appfolio/addTabs
Add Tabs
- Loading branch information
Showing
3 changed files
with
78 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<link id="theme" rel="stylesheet" href="https://s3-us-west-2.amazonaws.com/appfolio-frontend-dev/styles/bootstrap-saffron.min.css"> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | ||
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> | ||
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet"> |
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,76 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@kadira/storybook'; | ||
import { Nav, NavItem, NavLink } from '../src'; | ||
import { number } from '@kadira/storybook-addon-knobs'; | ||
|
||
const onClick = () => alert('Clicked!'); | ||
|
||
storiesOf('Nav', module) | ||
.addWithInfo('Tabs', () => { | ||
const activeTab = number('activeTab', 1); | ||
return ( | ||
<div> | ||
<Nav tabs> | ||
<NavItem> | ||
<NavLink active={activeTab === 1} onClick={onClick}> | ||
Receivables | ||
</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink active={activeTab === 2} onClick={onClick}> | ||
Payables | ||
</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink active={activeTab === 3} onClick={onClick}> | ||
Bank Accounts | ||
</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink active={activeTab === 4} onClick={onClick}> | ||
Journal Entries | ||
</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink active={activeTab === 5} onClick={onClick}> | ||
GL Accounts | ||
</NavLink> | ||
</NavItem> | ||
</Nav> | ||
</div> | ||
); | ||
}) | ||
.addWithInfo('Pills', () => { | ||
const activeTab = number('activeTab', 1); | ||
return ( | ||
<div> | ||
<Nav pills> | ||
<NavItem> | ||
<NavLink active={activeTab === 1} onClick={onClick}> | ||
Receivables | ||
</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink active={activeTab === 2} onClick={onClick}> | ||
Payables | ||
</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink active={activeTab === 3} onClick={onClick}> | ||
Bank Accounts | ||
</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink active={activeTab === 4} onClick={onClick}> | ||
Journal Entries | ||
</NavLink> | ||
</NavItem> | ||
<NavItem> | ||
<NavLink active={activeTab === 5} onClick={onClick}> | ||
GL Accounts | ||
</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