docs/_snippets/story-description-and-summary.md
import { Button } from './Button';
export default {
component: Button,
};
/**
* Primary buttons are used for the main action in a view.
* There should not be more than one primary button per view.
*
* @summary for the main action in a view
*/
export const Primary = {
args: { primary: true },
};
// Replace your-framework with the framework you are using, e.g. react-vite, nextjs, nextjs-vite, etc.
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button } from './Button';
const meta = {
component: Button,
} satisfies Meta<typeof Button>;
export default meta;
type Story = StoryObj<typeof meta>;
/**
* Primary buttons are used for the main action in a view.
* There should not be more than one primary button per view.
*
* @summary for the main action in a view
*/
export const Primary: Story = {
args: { primary: true },
};
import preview from '../.storybook/preview';
import { Button } from './Button';
const meta = preview.meta({
component: Button,
});
/**
* Primary buttons are used for the main action in a view.
* There should not be more than one primary button per view.
*
* @summary for the main action in a view
*/
export const Primary = meta.story({
args: { primary: true },
});
import preview from '../.storybook/preview';
import { Button } from './Button';
const meta = preview.meta({
component: Button,
});
/**
* Primary buttons are used for the main action in a view.
* There should not be more than one primary button per view.
*
* @summary for the main action in a view
*/
export const Primary = meta.story({
args: { primary: true },
});