Skip to content

Commit

Permalink
docs(tabs): added documentation for tabs component
Browse files Browse the repository at this point in the history
  • Loading branch information
Teemu Taskula committed Oct 4, 2017
1 parent 546c873 commit 5567e8e
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/src/components/Sidemenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class Sidemenu extends Component {
<MenuItem to='/utilities#outsidereactor'>OutsideReactor</MenuItem>
<MenuItem to='/utilities#placeholder'>PlaceholderRows</MenuItem>
<MenuItem to='/utilities#spinner'>Spinner</MenuItem>
<MenuItem to='/utilities#tabs'>Tabs</MenuItem>
<MenuItem to='/utilities#tooltip'>Tooltip</MenuItem>

<Gutter vertical />
Expand Down
52 changes: 50 additions & 2 deletions docs/src/components/Utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
PlaceholderRows,
OutsideReactor,
Modal,
Tabs,
} from 'react-components-kit';

import Properties from './common/Properties';
Expand All @@ -28,6 +29,7 @@ import {
outsideReactorExample,
placeholderExample,
modalExample,
tabsExample,
} from './codeSnippets';

import {
Expand All @@ -38,6 +40,7 @@ import {
placeholderProperties,
outsideReactorProperties,
modalProperties,
tabsProperties,
} from './compProperties';

class Utilities extends Component {
Expand Down Expand Up @@ -75,7 +78,7 @@ class Utilities extends Component {
return (
<div>
<Heading>Utilities</Heading>

<Heading h2 id='badge'>Badge</Heading>

<Layout align='center'>
Expand Down Expand Up @@ -276,7 +279,52 @@ class Utilities extends Component {
</Layout>

<Divider />


<Heading h2>Tabs</Heading>
<Layout>
<Tabs>
<Tabs.Panel label='Tab label 1'>
<Heading h4>Tab content 1</Heading>
<p>
Disrupt minimum viable product pivot waterfall is so 2000 and
late viral long shadow cortado SpaceTeam unicorn venture
capital pivot intuitive innovate. Disrupt sticky note user
centered design Steve Jobs ideate user story responsive.
</p>
</Tabs.Panel>
<Tabs.Panel label='Tab label 2'>
<Heading h4>Tab content 2</Heading>
<p>
Pair programming workflow co-working workflow piverate paradigm
hacker SpaceTeam. Quantitative vs. qualitative iterate
human-centered design bootstrapping user centered design
ideate driven physical computing quantitative vs. qualitative.
</p>
</Tabs.Panel>
<Tabs.Panel label='Tab label 3'>
<Heading h4>Tab content 3</Heading>
<p>
Pitch deck quantitative vs. qualitative long shadow driven fund
fund quantitative vs. qualitative. Pitch deck intuitive agile
bootstrapping hacker SpaceTeam piverate personas user centered
design affordances viral driven. Ship it sticky note
bootstrapping earned media thought leader responsive waterfall
is so 2000 and late human-centered design.
</p>
</Tabs.Panel>
</Tabs>
</Layout>

<Layout>
<CodeBlock code={tabsExample} />
</Layout>

<Layout>
<Properties properties={tabsProperties} />
</Layout>

<Divider />

<Heading h2>Tooltip</Heading>
<Layout>
<Layout.Box>
Expand Down
38 changes: 38 additions & 0 deletions docs/src/components/codeSnippets.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,3 +443,41 @@ class Example extends Component {
}
}
`;

export const tabsExample = `
import { Tabs } from 'react-components-kit';
const Example = () => (
<Tabs>
<Tabs.Panel label='Tab label 1'>
<Heading h4>Tab content 1</Heading>
<p>
Disrupt minimum viable product pivot waterfall is so 2000 and
late viral long shadow cortado SpaceTeam unicorn venture
capital pivot intuitive innovate. Disrupt sticky note user
centered design Steve Jobs ideate user story responsive.
</p>
</Tabs.Panel>
<Tabs.Panel label='Tab label 2'>
<Heading h4>Tab content 2</Heading>
<p>
Pair programming workflow co-working workflow piverate paradigm
hacker SpaceTeam. Quantitative vs. qualitative iterate
human-centered design bootstrapping user centered design
ideate driven physical computing quantitative vs. qualitative.
</p>
</Tabs.Panel>
<Tabs.Panel label='Tab label 3'>
<Heading h4>Tab content 3</Heading>
<p>
Pitch deck quantitative vs. qualitative long shadow driven fund
fund quantitative vs. qualitative. Pitch deck intuitive agile
bootstrapping hacker SpaceTeam piverate personas user centered
design affordances viral driven. Ship it sticky note
bootstrapping earned media thought leader responsive waterfall
is so 2000 and late human-centered design.
</p>
</Tabs.Panel>
</Tabs>
);
`;
9 changes: 9 additions & 0 deletions docs/src/components/compProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,4 +543,13 @@ export const modalProperties = [
},
];

export const tabsProperties = [
{
name: 'tabBreak',
type: 'string',
defaultVal: '768px',
description: 'A valid css value for max-width in media query (px, em etc)',
},
];

/* eslint-enable max-len */

0 comments on commit 5567e8e

Please sign in to comment.