Skip to content

Instantly share code, notes, and snippets.

@mmitou
Created January 20, 2023 10:57
Show Gist options
  • Save mmitou/f8ac4b7d17a6f28923e2348f1d05d34d to your computer and use it in GitHub Desktop.
Save mmitou/f8ac4b7d17a6f28923e2348f1d05d34d to your computer and use it in GitHub Desktop.
sveltekitでstorybookのdecolatorを使いたい時
<div class="h-80 w-full"><slot /></div>
import SignIn from './SignIn.svelte';
import Full from './Full.svelte';
import type { Meta, StoryObj, SvelteRenderer } from '@storybook/svelte';
import type { DecoratorFunction } from '@storybook/types';
const meta = {
component: SignIn,
decorators: [() => Full] as DecoratorFunction<SvelteRenderer<SignIn>, object>[]
} satisfies Meta<SignIn>;
type Story = StoryObj<typeof meta>;
export const Primary: Story = {
args: {}
};
export default meta;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment