Files
cunningham/packages/react/src/components/Forms/Field/index.stories.tsx
Nathan Vasse 77721c3b6d ♻️(react) migrate to Storybook 7
This new release comes with breaking changes for stories and mdx docs.
2023-05-15 11:04:06 +02:00

44 lines
808 B
TypeScript

import { Meta, StoryFn } from "@storybook/react";
import React from "react";
import { Field } from ":/components/Forms/Field/index";
export default {
title: "Components/Forms/Field",
component: Field,
} as Meta<typeof Field>;
const Template: StoryFn<typeof Field> = (args) => (
<Field {...args}>
<strong>Any children</strong>
</Field>
);
export const Default = {
render: Template,
args: {
text: "This is an optional text",
rightText: "Right text",
},
};
export const Success = {
render: Template,
args: {
state: "success",
text: "This is an optional success message",
rightText: "Right text",
},
};
export const Error = {
render: Template,
args: {
state: "error",
text: "This is an optional error message",
rightText: "Right text",
},
};