diff --git a/docs/app/Examples/modules/Tab/Usage/TabExampleCustomMenuItem.js b/docs/app/Examples/modules/Tab/Usage/TabExampleCustomMenuItem.js new file mode 100644 index 0000000000..4469f6bb23 --- /dev/null +++ b/docs/app/Examples/modules/Tab/Usage/TabExampleCustomMenuItem.js @@ -0,0 +1,19 @@ +import React from 'react' +import { Label, Menu, Tab } from 'semantic-ui-react' + +const panes = [ + { + menuItem: { key: 'users', icon: 'users', content: 'Users' }, + render: () => Tab 1 Content, + }, + { + menuItem: Messages, + render: () => Tab 2 Content, + }, +] + +const TabExampleCustomMenuItem = () => ( + +) + +export default TabExampleCustomMenuItem diff --git a/docs/app/Examples/modules/Tab/Usage/index.js b/docs/app/Examples/modules/Tab/Usage/index.js index 50857b69c8..63d78750bb 100644 --- a/docs/app/Examples/modules/Tab/Usage/index.js +++ b/docs/app/Examples/modules/Tab/Usage/index.js @@ -19,6 +19,11 @@ const TabUsageExamples = () => ( description='You can capture the tab change event.' examplePath='modules/Tab/Usage/TabExampleOnTabChange' /> + ) diff --git a/src/modules/Tab/Tab.js b/src/modules/Tab/Tab.js index 384eab9a1d..1d94d161d9 100644 --- a/src/modules/Tab/Tab.js +++ b/src/modules/Tab/Tab.js @@ -54,7 +54,7 @@ class Tab extends Component { * } */ panes: PropTypes.arrayOf(PropTypes.shape({ - menuItem: PropTypes.string.isRequired, + menuItem: customPropTypes.itemShorthand, render: PropTypes.func.isRequired, })), }