import type { Meta, StoryObj } from '@storybook/vue3' import { UTableCell, UAvatarGroup, UProgressBar, UButton, UTableCellSupText, UTableCellText, } from '../components' import { UTableCellProps } from '../components/UTable/UTableCell' import { ExtractPropTypes } from 'vue' const meta: Meta = { title: 'Example/TableCell', component: UTableCell, tags: ['autodocs'], argTypes: { disabled: { control: 'boolean', defaultValue: false }, badges: { table: { disable: true } }, isChecked: { control: 'select', options: [undefined, true, false] }, checkboxType: { control: 'select', options: ['default', 'radio'] }, divider: { control: 'select', options: ['divider line', 'alternating fills'], }, }, } export default meta type Story = StoryObj export const TextTableCell: Story = { render: (args: ExtractPropTypes) => ({ components: { UTableCell, UTableCellSupText, UTableCellText }, setup() { return { args } }, template: ` Olivia Rhye olivia@untitledui.com `, }), args: {} as UTableCellProps, } export const BadgesTableCell: Story = { render: (args: ExtractPropTypes) => ({ components: { UTableCell }, setup() { return { args } }, template: ``, }), args: { badges: [ { text: 'Label', color: 'primary', size: 'sm' }, { text: 'Label', color: 'blue', size: 'sm' }, { text: 'Label', color: 'indigo', size: 'sm' }, { text: 'Label', color: 'indigo', size: 'sm' }, { text: 'Label', color: 'indigo', size: 'sm' }, { text: 'Label', color: 'indigo', size: 'sm' }, { text: 'Label', color: 'indigo', size: 'sm' }, { text: 'Label', color: 'indigo', size: 'sm' }, ], } as UTableCellProps, } export const AvatarTableCell: Story = { render: (args: ExtractPropTypes) => ({ components: { UTableCell, UAvatarGroup }, setup() { return { args } }, template: ` `, }), args: { // } as UTableCellProps, } export const ButtonTableCell: Story = { render: (args: ExtractPropTypes) => ({ components: { UTableCell, UButton }, setup() { return { args } }, template: ` `, }), args: { // } as UTableCellProps, } export const ProgressBarTableCell: Story = { render: (args: ExtractPropTypes) => ({ components: { UTableCell, UProgressBar }, setup() { return { args } }, template: ` `, }), args: { // } as UTableCellProps, }