Skip to content

Instantly share code, notes, and snippets.

@kwoncharles
Last active December 26, 2020 08:23
Show Gist options
  • Save kwoncharles/4f3bcd583cd686567b8d039b47210023 to your computer and use it in GitHub Desktop.
Save kwoncharles/4f3bcd583cd686567b8d039b47210023 to your computer and use it in GitHub Desktop.
composition tab1
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