-
Notifications
You must be signed in to change notification settings - Fork 4k
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 (#1976)
* feat(Tab): add `renderActiveOnly` prop * style(Tab): fix lint * docs(Tab): update verbiage
- Loading branch information
1 parent
1980806
commit e3c4972
Showing
10 changed files
with
154 additions
and
20 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
26 changes: 26 additions & 0 deletions
26
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,26 @@ | ||
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