Last active
December 26, 2020 08:23
-
-
Save kwoncharles/4f3bcd583cd686567b8d039b47210023 to your computer and use it in GitHub Desktop.
composition tab1
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
function Page() { | |
const [selectedTab, setTab] = React.useState(initialTab) | |
return ( | |
<Tabs> | |
{tabItems.map(tabItem => ( | |
<Tabs.Item | |
value={tabItem} | |
isSelected={selectedTab === tabItem} | |
onSelect={setTab} | |
> | |
{tabItem} | |
</Tabs.Item> | |
))} | |
</Tabs> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment