feat(SW-3636): Storybook structure * New sections in Storybook sidebar * Group Storybook content files and add token files for spacing, border radius and shadows Approved-by: Joakim Jäderberg
42 lines
688 B
TypeScript
42 lines
688 B
TypeScript
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
|
|
|
|
import { Loading } from './Loading'
|
|
import { config } from './variants'
|
|
|
|
const meta: Meta<typeof Loading> = {
|
|
title: 'Patterns/Loading',
|
|
component: Loading,
|
|
argTypes: {
|
|
type: {
|
|
control: 'select',
|
|
options: Object.keys(config.variants.type),
|
|
},
|
|
size: {
|
|
control: 'number',
|
|
},
|
|
},
|
|
}
|
|
|
|
export default meta
|
|
|
|
type Story = StoryObj<typeof Loading>
|
|
|
|
export const Dark: Story = {
|
|
args: {
|
|
type: 'Dark',
|
|
size: 40,
|
|
},
|
|
}
|
|
|
|
export const White: Story = {
|
|
args: {
|
|
type: 'White',
|
|
size: 40,
|
|
},
|
|
parameters: {
|
|
backgrounds: {
|
|
default: 'Scandic Primary Dark',
|
|
},
|
|
},
|
|
}
|