diff --git a/packages/snaps-sdk/src/jsx/components/Footer.stories.tsx b/packages/snaps-sdk/src/jsx/components/Footer.stories.tsx new file mode 100644 index 0000000000..85388ecd4a --- /dev/null +++ b/packages/snaps-sdk/src/jsx/components/Footer.stories.tsx @@ -0,0 +1,48 @@ +import type { Meta, Story } from '@metamask/snaps-storybook'; + +import type { FooterProps } from './Footer'; +import { Footer } from './Footer'; +import { Button } from './form'; + +const meta: Meta = { + title: 'Footer', + component: Footer, + argTypes: { + children: { + description: + 'The button(s) to render in the footer. If only one button is provided, a cancel button is added automatically.', + table: { + type: { + summary: 'Button | [Button, Button]', + }, + }, + }, + }, +}; + +export default meta; + +/** + * The footer component one custom button. A cancel button is added + * automatically if only one button is provided. + * + * When the user clicks the first button, the `onUserInput` handler is called + * with the name of the button (if provided). + */ +export const Default: Story = { + render: (props) =>