1
0
This repository has been archived on 2024-11-10. You can view files and clone it, but cannot push or open issues or pull requests.
Files
arduino-parts-inventory/web/src/components/PartsCell/PartsCell.stories.tsx
Ahmed Al-Taiar 53e0070fd8 Part browsing
2023-11-04 17:32:14 -04:00

35 lines
771 B
TypeScript

import type { Meta, StoryObj } from '@storybook/react'
import { Loading, Empty, Failure, Success } from './PartsCell'
import { standard } from './PartsCell.mock'
const meta: Meta = {
title: 'Cells/PartsCell',
}
export default meta
export const loading: StoryObj<typeof Loading> = {
render: () => {
return Loading ? <Loading /> : <></>
},
}
export const empty: StoryObj<typeof Empty> = {
render: () => {
return Empty ? <Empty /> : <></>
},
}
export const failure: StoryObj<typeof Failure> = {
render: (args) => {
return Failure ? <Failure error={new Error('Oh no')} {...args} /> : <></>
},
}
export const success: StoryObj<typeof Success> = {
render: (args) => {
return Success ? <Success {...standard()} {...args} /> : <></>
},
}