diff --git a/.changeset/five-bikes-sell.md b/.changeset/five-bikes-sell.md new file mode 100644 index 00000000..8cfac48b --- /dev/null +++ b/.changeset/five-bikes-sell.md @@ -0,0 +1,5 @@ +--- +"@spear-ai/ui": minor +--- + +Added Switch story. diff --git a/packages/ui/src/components/switch/switch.stories.tsx b/packages/ui/src/components/switch/switch.stories.tsx new file mode 100644 index 00000000..3aa0e53e --- /dev/null +++ b/packages/ui/src/components/switch/switch.stories.tsx @@ -0,0 +1,64 @@ +import type { Meta, StoryObj } from "@storybook/react"; +import { Form, Switch } from "react-aria-components"; +import { useIntl } from "react-intl"; + +const PreviewSwitch = (properties: { + hasLabel: boolean; + isDisabled: boolean; + isPrimary: boolean; + isReadonly: boolean; + isSquished: boolean; +}) => { + const { hasLabel, isDisabled, isPrimary, isReadonly, isSquished } = properties; + const intl = useIntl(); + + return ( +