import type {Meta, StoryObj} from '@storybook/web-components'; import {ObcAppButton} from './app-button'; import './app-button'; import {iconIds, iconIdToIconHtml} from '../../storybook-util'; import {html} from 'lit'; const meta: Meta = { title: 'Button/App button', tags: ['autodocs'], component: 'obc-app-button', args: { size: 'normal', icon: 'ship', label: 'Button', }, argTypes: { icon: { control: {type: 'select'}, options: iconIds, }, size: { control: {type: 'select'}, options: ['normal', 'small'], }, label: { control: {type: 'text'}, }, checked: { control: {type: 'boolean'}, }, }, render: (args) => { const icon = args.icon ? iconIdToIconHtml(args.icon, {size: 24, slot: 'icon'}) : ''; return html`${icon}`; }, } satisfies Meta; export default meta; type Story = StoryObj; export const Primary: Story = { args: {}, }; export const Checked: Story = { args: { checked: true, }, }; export const Small: Story = { args: { size: 'small', }, };