Last active
December 26, 2020 08:23
-
-
Save kwoncharles/4f3bcd583cd686567b8d039b47210023 to your computer and use it in GitHub Desktop.
Revisions
-
kwoncharles revised this gist
Dec 26, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ function Page() { const [selectedTab, setTab] = React.useState(initialTab) return ( <Tabs> -
kwoncharles created this gist
Dec 24, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ function Page() { const [selectedTab, setTab] = React.useState(tabItems) return ( <Tabs> {tabItems.map(tabItem => ( <Tabs.Item value={tabItem} isSelected={selectedTab === tabItem} onSelect={setTab} > {tabItem} </Tabs.Item> ))} </Tabs> ) }