Feature/storybook tests * feature: add interaction tests for storybook and upgrade storybook@9 * add a11y testing for storybook * Merge branch 'master' of bitbucket.org:scandic-swap/web into feature/storybook-tests * Test and build only required packages * . * . * . * . * . * . * . * disable playwright tests in netlify ci * . * debug out process.env * don't run playwright on CI * remove unused netlify-plugin-playwright-cache * . * . * . * . * . * . * remove turbo dependancy to design-system#test * merge * merge Approved-by: Anton Gunnarsson
42 lines
689 B
TypeScript
42 lines
689 B
TypeScript
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
|
|
import { Loading } from './Loading'
|
|
import { config } from './variants'
|
|
|
|
const meta: Meta<typeof Loading> = {
|
|
title: 'Components/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',
|
|
},
|
|
},
|
|
}
|