import type { Meta, StoryObj } from "@storybook/react"; import { excludeControls } from "../../utils"; import { Box } from "../Box"; import type { TextProps } from "./Text"; import { Text } from "./Text"; type StoryType = StoryObj; const meta: Meta = { title: "Components/Text", component: Text, excludeStories: ["ExampleSpacing"], argTypes: excludeControls("style"), }; export const Heading1: StoryType = { render: (args: TextProps) => Heading 1, args: { elementType: "h1", }, }; export const Heading2: StoryType = { render: (args: TextProps) => Heading 2, args: { elementType: "h2", }, }; export const Heading3: StoryType = { render: (args: TextProps) => Heading 3, args: { elementType: "h3", }, }; export const Heading4: StoryType = { render: (args: TextProps) => Heading 4, args: { elementType: "h4", }, }; export const Paragraph: StoryType = { render: (args: TextProps) => Paragraph, args: { elementType: "p", }, }; export const Small: StoryType = { render: (args: TextProps) => Small paragraph, args: { variant: "small", }, }; export const Legal: StoryType = { render: (args: TextProps) => Small print, args: { variant: "legal", }, }; export const VariantHeading1: StoryType = { render: (args: TextProps) => Variant H1, args: { variant: "h1", }, }; export const VariantHeading2: StoryType = { render: (args: TextProps) => Variant H2, args: { variant: "h2", }, }; export const VariantHeading3: StoryType = { render: (args: TextProps) => Variant H3, args: { variant: "h3", }, }; export const VariantHeading4: StoryType = { render: (args: TextProps) => Variant H4, args: { variant: "h4", }, }; export const VariantBody: StoryType = { render: (args: TextProps) => Variant body, args: { variant: "body", }, }; export const VariantSmall: StoryType = { render: (args: TextProps) => Variant small, args: { variant: "small", }, }; export const VariantLegal: StoryType = { render: (args: TextProps) => Variant legal, args: { variant: "legal", }, }; export const VariantTitle: StoryType = { render: (args: TextProps) => Variant title, args: { variant: "title", }, }; export const Themed: StoryType = { render: (args: TextProps) => Sample Text, args: { elementType: "h4", variant: "h4", style: { color: "green", }, }, }; export const ExampleSpacing = () => ( Tight paragraph spacing Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi vel lorem enim. Nam vitae enim mollis turpis scelerisque vulputate id sit amet nisl. Etiam et tortor a nunc hendrerit luctus sed at nunc. Mauris pharetra enim et turpis lacinia, quis porta velit commodo. Scelerisque vulputate id sit amet nisl. Etiam et tortor a nunc hendrerit luctus sed at nunc. Ut vel lectus arcu. Etiam ut efficitur turpis, pretium pretium nunc. Ut dolor nibh, facilisis at tempus at, iaculis sed mi. Loose paragraph spacing Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi vel lorem enim. Nam vitae enim mollis turpis scelerisque vulputate id sit amet nisl. Etiam et tortor a nunc hendrerit luctus sed at nunc. Mauris pharetra enim et turpis lacinia, quis porta velit commodo. Scelerisque vulputate id sit amet nisl. Etiam et tortor a nunc hendrerit luctus sed at nunc. Ut vel lectus arcu. Etiam ut efficitur turpis, pretium pretium nunc. Ut dolor nibh, facilisis at tempus at, iaculis sed mi. ); export default meta;