diff --git a/ui/box/src/play.stories.jsx b/ui/box/src/play.stories.tsx similarity index 64% rename from ui/box/src/play.stories.jsx rename to ui/box/src/play.stories.tsx index cb64ae571..cfa7edc00 100644 --- a/ui/box/src/play.stories.jsx +++ b/ui/box/src/play.stories.tsx @@ -1,13 +1,14 @@ import * as React from "react"; -import { Story } from "@storybook/react"; import { Box as Component } from "./box"; +import type { ComponentMeta, ComponentStory } from "@storybook/react"; + export default { title: "Box", component: Component, -}; +} as ComponentMeta; -const Template: Story = (args) => ( +const Template: ComponentStory = (args) => ( ; const Column = styled("div", { display: "flex", @@ -51,7 +53,10 @@ const Stack = styled("div", { borderRadius: "$075", }); -const Template = ({ children, ...args }, context) => { +const Template: ComponentStory = ( + { children, ...args }, + context +) => { return ( <> diff --git a/ui/card/src/play.stories.jsx b/ui/card/src/play.stories.tsx similarity index 88% rename from ui/card/src/play.stories.jsx rename to ui/card/src/play.stories.tsx index 099affa4c..a813f1afd 100644 --- a/ui/card/src/play.stories.jsx +++ b/ui/card/src/play.stories.tsx @@ -1,13 +1,15 @@ import * as React from "react"; -import { Card as Component } from "./"; +import { Card as Component } from "."; import { theme, styled } from "@washingtonpost/wpds-theme"; import { Button } from "@washingtonpost/wpds-button"; import { Accordion, ACCORDION_TYPE } from "@washingtonpost/wpds-accordion"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; + export default { title: "Card", component: Component, -}; +} as ComponentMeta; const Stack = styled("section", { display: "flex", @@ -23,7 +25,7 @@ const Label = styled("h3", { textAlign: "center", }); -const DefaultTemplate = (args) => ( +const DefaultTemplate: ComponentStory = (args) => ( @@ -37,7 +39,6 @@ const DefaultTemplate = (args) => ( Lava pooling from a volcano @@ -47,11 +48,11 @@ const DefaultTemplate = (args) => ( export const Card = DefaultTemplate.bind({}); -const styledText = styled("p", { +const StyledText = styled("p", { overflow: "wrap", width: "100px", }); -const Container = styled({ +const Container = styled("div", { padding: theme.space["100"], }); @@ -59,7 +60,7 @@ const OptionsT = (args) => ( - Brand new digital content free with subscription! + Brand new digital content free with subscription! @@ -76,15 +77,14 @@ const OptionsT = (args) => ( Vibrant quinoa bowl with carrots, tomatoes, and cucumbers - + How Saria makes ready-to-eat quinoa bowls with lots of veggies. - + diff --git a/ui/checkbox/src/play.stories.jsx b/ui/checkbox/src/play.stories.tsx similarity index 97% rename from ui/checkbox/src/play.stories.jsx rename to ui/checkbox/src/play.stories.tsx index 85fcb119e..98e90d65e 100644 --- a/ui/checkbox/src/play.stories.jsx +++ b/ui/checkbox/src/play.stories.tsx @@ -2,6 +2,8 @@ import * as React from "react"; import { styled, theme } from "@washingtonpost/wpds-theme"; import { Checkbox as Component } from "."; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; + const variants = ["primary", "secondary", "cta"]; const size = ["087", "125"]; const isOutline = [true, false]; @@ -68,7 +70,7 @@ export default { control: "text", }, }, -}; +} as ComponentMeta; export const Play = (args) => { const [checked, setChecked] = React.useState(false); @@ -86,7 +88,7 @@ Play.args = {}; Play.storyName = "Checkbox"; -const ChromaticTemplate = () => { +const ChromaticTemplate: ComponentStory = () => { const isRequired = true; return ( <> diff --git a/ui/container/src/play.stories.jsx b/ui/container/src/play.stories.tsx similarity index 87% rename from ui/container/src/play.stories.jsx rename to ui/container/src/play.stories.tsx index ed0329e70..65229c742 100644 --- a/ui/container/src/play.stories.jsx +++ b/ui/container/src/play.stories.tsx @@ -2,6 +2,8 @@ import * as React from "react"; import { Box } from "@washingtonpost/wpds-box"; import { Container as Component } from "."; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; + export default { title: "Container", component: Component, @@ -14,9 +16,9 @@ export default { parameters: { layout: "fullscreen", }, -}; +} as ComponentMeta; -const Template = (args) => ( +const Template: ComponentStory = (args) => ( <> Extra lg lg