import React, { useState } from "react"; import { SegmentControl } from "./SegmentControl.js"; import { createReportDecorator } from "./storybook/ReportDecorator.js"; import Translator from "./i18n/TranslatorAsync.js"; import { ReportPage } from "./ReportPage.js"; import Card from "./Card.js"; import Skeleton from "./Skeleton.js"; export const segmentControl = () => { const [tab, setTab] = useState("one"); return ( setTab(segment)} segments={[ { id: "one", label: "One" }, { id: "two", label: "Two" }, { id: "three", label: "Three" }, ]} /> ); }; export default { component: SegmentControl, title: "Components/SegmentControl", decorators: [createReportDecorator()], };