import * as React from "react"; import { StoryFn, Meta } from "@storybook/react"; import { SegmentedControl } from "../index"; import SegmentedControlButton from "../components/SegmentedControlButton"; import { Icon } from "../../icon"; import { SystemIcons } from "../../icons/dist/system-icons-enum"; export default { title: "Forms/SegmentedControl", component: SegmentedControl } as Meta; const Template: StoryFn = args => { const [selectedSegment, setSelectedSegment] = React.useState(""); const handleChange = value => { setSelectedSegment(value); }; return ( Exosphere Thermosphere Mesosphere Stratosphere ); }; export const Default = { render: Template }; export const WithASelectedSegment = () => { const [selectedSegment, setSelectedSegment] = React.useState("exosphere"); const handleChange = value => { setSelectedSegment(value); }; return ( Exosphere Thermosphere Mesosphere Stratosphere ); }; export const IconOnlyButtonLabels = () => { const [selectedSegment, setSelectedSegment] = React.useState(""); const handleChange = value => { setSelectedSegment(value); }; return ( ); }; export const WithTooltipContent = () => { const [selectedSegment, setSelectedSegment] = React.useState(""); const handleChange = value => { setSelectedSegment(value); }; return ( ); }; export const CustomSegmentedControlButtonIdProp = () => { const [selectedSegment, setSelectedSegment] = React.useState(""); const handleChange = value => { setSelectedSegment(value); }; return ( Exosphere Thermosphere Mesosphere Stratosphere ); };