-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Tab): add
renderActiveOnly
prop
- Loading branch information
Alexander Fedyashov
committed
Aug 17, 2017
1 parent
a4780cd
commit a2b4a24
Showing
10 changed files
with
156 additions
and
14 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react' | ||
import { Tab } from 'semantic-ui-react' | ||
|
||
const panes = [ | ||
{ menuItem: 'Tab 1', pane: 'Tab 1 Content' }, | ||
{ menuItem: 'Tab 2', pane: 'Tab 2 Content' }, | ||
{ menuItem: 'Tab 3', pane: 'Tab 3 Content' }, | ||
] | ||
|
||
const TabExampleBasicAll = () => ( | ||
<Tab panes={panes} renderActiveOnly={false} /> | ||
) | ||
|
||
export default TabExampleBasicAll |
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
25 changes: 25 additions & 0 deletions
25
docs/app/Examples/modules/Tab/Usage/TabExamplePaneShorthand.js
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,25 @@ | ||
import React from 'react' | ||
import { List, Label, Tab } from 'semantic-ui-react' | ||
|
||
const panes = [ | ||
{ menuItem: 'Tab 1', pane: { key: 'tab1', content: 'This is massive tab', size: 'massive' } }, | ||
{ menuItem: 'Tab 2', pane: { key: 'tab2', content: 'This tab has a center aligned text', textAlign: 'center' } }, | ||
{ menuItem: 'Tab 3', pane: { key: 'tab3', content: <div>This tab contains an <Label>JSX</Label> element</div> } }, | ||
{ menuItem: 'Tab 4', pane: ( | ||
<Tab.Pane key='tab4'> | ||
<p>This tab has a complex content</p> | ||
|
||
<List> | ||
<List.Item>Apples</List.Item> | ||
<List.Item>Pears</List.Item> | ||
<List.Item>Oranges</List.Item> | ||
</List> | ||
</Tab.Pane> | ||
) }, | ||
] | ||
|
||
const TabExampleContentShorthand = () => ( | ||
<Tab panes={panes} renderActiveOnly={false} /> | ||
) | ||
|
||
export default TabExampleContentShorthand |
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
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