Skip to content

Commit

Permalink
chore: migrate legacy stories to new story format (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas authored Dec 5, 2024
1 parent 64c9b50 commit 0822462
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 45 deletions.
6 changes: 3 additions & 3 deletions src/stories/Button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"
import { Button, ButtonProps } from "../react-components"
import { Container } from "./storyhelper"

export default {
title: "Component/Button",
component: Button,
} as ComponentMeta<typeof Button>
} as Meta<typeof Button>

const Template: Story<ButtonProps> = (args: ButtonProps) => (
const Template: StoryFn<ButtonProps> = (args: ButtonProps) => (
<Container>
<Button {...args} />
</Container>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/ButtonSocial.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"
import { ButtonSocial, ButtonSocialProps } from "../react-components"
import { Container } from "./storyhelper"

export default {
title: "Component/ButtonSocial",
component: ButtonSocial,
} as ComponentMeta<typeof ButtonSocial>
} as Meta<typeof ButtonSocial>

const Template: Story<ButtonSocialProps> = (args: ButtonSocialProps) => (
const Template: StoryFn<ButtonSocialProps> = (args: ButtonSocialProps) => (
<Container>
<ButtonSocial {...args} />
</Container>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/Card.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"
import { Card, CardProps, Message } from "../react-components"
import logo from "./assets/logo.svg"
import oryLogo from "./assets/ory_logomark.svg"
Expand All @@ -10,9 +10,9 @@ import { Container } from "./storyhelper"
export default {
title: "Component/Card",
component: Card,
} as ComponentMeta<typeof Card>
} as Meta<typeof Card>

const Template: Story<CardProps> = (args: CardProps) => (
const Template: StoryFn<CardProps> = (args: CardProps) => (
<Container>
<Card {...args} />
</Container>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"
import { Checkbox, CheckboxProps, Message } from "../react-components"
import { Container } from "./storyhelper"

Expand All @@ -14,9 +14,9 @@ export default {
control: { type: "radio" },
},
},
} as ComponentMeta<typeof Checkbox>
} as Meta<typeof Checkbox>

const Template: Story<CheckboxProps> = (args: CheckboxProps) => (
const Template: StoryFn<CheckboxProps> = (args: CheckboxProps) => (
<Container>
<Checkbox {...args} />
</Container>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/Codebox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"
import { CodeBox, CodeBoxProps } from "../react-components/codebox"
import { Container } from "./storyhelper"

export default {
title: "Component/CodeBox",
component: CodeBox,
} as ComponentMeta<typeof CodeBox>
} as Meta<typeof CodeBox>

const Template: Story<CodeBoxProps> = (args: CodeBoxProps) => (
const Template: StoryFn<CodeBoxProps> = (args: CodeBoxProps) => (
<Container>
<CodeBox {...args}>{args.children}</CodeBox>
</Container>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/Divider.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"
import { Divider, DividerProps } from "../react-components"
import { Container } from "./storyhelper"

export default {
title: "Component/Divider",
component: Divider,
} as ComponentMeta<typeof Divider>
} as Meta<typeof Divider>

const Template: Story<DividerProps> = (args: DividerProps) => (
const Template: StoryFn<DividerProps> = (args: DividerProps) => (
<Container>
<Divider {...args} />
</Container>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/GradientCard.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"
import { CardGradient, CardGradientProps } from "../react-components"
import { Container } from "./storyhelper"

export default {
title: "Component/CardGradient",
component: CardGradient,
} as ComponentMeta<typeof CardGradient>
} as Meta<typeof CardGradient>

const Template: Story<CardGradientProps> = (args: CardGradientProps) => (
const Template: StoryFn<CardGradientProps> = (args: CardGradientProps) => (
<Container>
<CardGradient {...args} />
</Container>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/InputField.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"
import { InputField, InputFieldProps, Message } from "../react-components"
import { Container } from "./storyhelper"

Expand All @@ -14,9 +14,9 @@ export default {
control: { type: "radio" },
},
},
} as ComponentMeta<typeof InputField>
} as Meta<typeof InputField>

const Template: Story<InputFieldProps> = (args: InputFieldProps) => (
const Template: StoryFn<InputFieldProps> = (args: InputFieldProps) => (
<Container>
<InputField {...args} />
</Container>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/Message.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"
import { Message, MessageProps } from "../react-components"
import { colorSprinkle } from "../theme"
import { Container } from "./storyhelper"

export default {
title: "Component/Message",
component: Message,
} as ComponentMeta<typeof Message>
} as Meta<typeof Message>

export type MessageStoryProps = MessageProps

const Template: Story<MessageProps> = (args: MessageProps) => (
const Template: StoryFn<MessageProps> = (args: MessageProps) => (
<Container>
<Message {...args}>I am a Message</Message>
<Message {...args} className={colorSprinkle({ color: "foregroundMuted" })}>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/Nav.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"
import { Card, Nav, NavProps } from "../react-components"
import { Container } from "./storyhelper"

export default {
title: "Component/Nav",
component: Nav,
} as ComponentMeta<typeof Nav>
} as Meta<typeof Nav>

const Template: Story<NavProps> = (args: NavProps) => (
const Template: StoryFn<NavProps> = (args: NavProps) => (
<Container>
<div
style={{
Expand Down
6 changes: 3 additions & 3 deletions src/stories/Ory/Auth.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"
import { UserAuthCard, UserAuthCardProps } from "../../react-components"
import { Container } from "../storyhelper"

Expand Down Expand Up @@ -32,9 +32,9 @@ import logo from "../assets/logo.svg"
export default {
title: "Ory/UserAuthCard",
component: UserAuthCard,
} as ComponentMeta<typeof UserAuthCard>
} as Meta<typeof UserAuthCard>

const Template: Story<UserAuthCardProps> = (args: UserAuthCardProps) => (
const Template: StoryFn<UserAuthCardProps> = (args: UserAuthCardProps) => (
<Container>
<UserAuthCard {...args} />
</Container>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/Ory/AuthError.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"
import { UserErrorCard, UserErrorCardProps } from "../../react-components"
import { Container } from "../storyhelper"

Expand All @@ -10,9 +10,9 @@ import { authError400, authError500 } from "./auth-error-data"
export default {
title: "Ory/ErrorAuthCard",
component: UserErrorCard,
} as ComponentMeta<typeof UserErrorCard>
} as Meta<typeof UserErrorCard>

const Template: Story<UserErrorCardProps> = (args: UserErrorCardProps) => (
const Template: StoryFn<UserErrorCardProps> = (args: UserErrorCardProps) => (
<Container>
<UserErrorCard {...args} />
</Container>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/Ory/AuthSettings.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"
import { UserSettingsCard, UserSettingsCardProps } from "../../react-components"
import { Container } from "../storyhelper"

Expand All @@ -10,9 +10,9 @@ import { settingsFlow, settingsUnlinkFlow } from "./settings-data"
export default {
title: "Ory/UserSettingsCard",
component: UserSettingsCard,
} as ComponentMeta<typeof UserSettingsCard>
} as Meta<typeof UserSettingsCard>

const Template: Story<UserSettingsCardProps> = (
const Template: StoryFn<UserSettingsCardProps> = (
args: UserSettingsCardProps,
) => (
<Container>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/Ory/Consent.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import { ComponentProps } from "react"
import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"

import { Container } from "../storyhelper"
import { UserConsentCard } from "../../react-components"
Expand All @@ -11,9 +11,9 @@ import logo from "../assets/logo.svg"
export default {
title: "Ory/UserConsentCard",
component: UserConsentCard,
} as ComponentMeta<typeof UserConsentCard>
} as Meta<typeof UserConsentCard>

const Template: Story<ComponentProps<typeof UserConsentCard>> = (
const Template: StoryFn<ComponentProps<typeof UserConsentCard>> = (
args: ComponentProps<typeof UserConsentCard>,
) => (
<Container>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/Ory/Logout.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import { ComponentProps } from "react"
import { ComponentMeta, Story } from "@storybook/react"
import { Meta, StoryFn } from "@storybook/react"

import { Container } from "../storyhelper"
import { UserLogoutCard } from "../../react-components"
Expand All @@ -11,9 +11,9 @@ import logo from "../assets/logo.svg"
export default {
title: "Ory/UserLogoutCard",
component: UserLogoutCard,
} as ComponentMeta<typeof UserLogoutCard>
} as Meta<typeof UserLogoutCard>

const Template: Story<ComponentProps<typeof UserLogoutCard>> = (args) => (
const Template: StoryFn<ComponentProps<typeof UserLogoutCard>> = (args) => (
<Container>
<UserLogoutCard {...args} />
</Container>
Expand Down

0 comments on commit 0822462

Please sign in to comment.