Last active
February 14, 2017 13:48
-
-
Save carlqt/14431ea12eeb6e8e9df1385ec62cebc8 to your computer and use it in GitHub Desktop.
snippet issue for MUICSS Tab
This file contains hidden or 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 is the simple tab snippet to render. | |
render() { | |
return ( | |
<Tabs justified={true}> | |
<Tab value="pane-1" label="Tab 1">Pane-1</Tab> | |
{this.newInstanceTab(false)} | |
</Tabs> | |
); | |
// this is newInstanceTab method | |
newInstanceTab(flag) { | |
if (flag) { | |
return ( | |
<Tab value="pane-2" label="Tab 2">Pane-2</Tab> | |
) | |
} | |
} | |
// I want to hide the Pane-2 tab if the flag is false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment