function TabExample() {
const [activeIndex, setActiveIndex] = React.useState(0);
const [wrap, setWrap] = React.useState(false);
const handleChange = ({ activeTabIndex, event }) => {
event.preventDefault();
setActiveIndex(activeTabIndex)
};
const tabs = [
{ href: "https://pinterest.com", text: "Boards for You", indicator: "dot" },
{ href: "https://pinterest.com", text: "Pins for You" },
{ href: "https://pinterest.com", text: "Following" },
{ href: "https://pinterest.com", text: "People to Follow" },
];
return (
<Flex alignItems="start" direction="column" gap={4}>
<Flex gap={4} padding={2}>
<Label htmlFor="wrap">
<Text>Wrap</Text>
</Label>
<Switch
id="wrap"
onChange={() => setWrap(!wrap)}
switched={wrap}
/>
</Flex>
<Box borderStyle="sm" color="lightGray" maxWidth={500} overflow="auto" padding={1}>
<Tabs
activeTabIndex={activeIndex}
bgColor="transparent"
onChange={handleChange}
tabs={tabs}
wrap={wrap}
/>
</Box>
</Flex>
);
}