import { FC } from 'react' import type { Meta } from '@storybook/react' import PdfCompileButton from '@/features/pdf-preview/components/pdf-compile-button' import { ScopeDecorator } from '../decorators/scope' import { CompileContext } from '@/shared/context/local-compile-context' import { DetachCompileContext } from '@/shared/context/detach-compile-context' import { bsVersionDecorator } from '../../../.storybook/utils/with-bootstrap-switcher' export const CompileButton: FC = (props: CompileContext) => (
) const args: Partial = { autoCompile: false, compiling: false, draft: false, hasChanges: false, stopOnFirstError: false, stopOnValidationError: false, animateCompileDropdownArrow: false, } const meta: Meta = { title: 'Editor / Toolbar / Compile Button', component: CompileButton, // @ts-ignore decorators: [ScopeDecorator], argTypes: { ...bsVersionDecorator.argTypes, startCompile: { action: 'startCompile' }, setAutoCompile: { action: 'setAutoCompile' }, setCompiling: { action: 'setCompiling' }, setDraft: { action: 'setDraft' }, setStopOnFirstError: { action: 'setStopOnFirstError' }, setError: { action: 'setError' }, setHasLintingError: { action: 'setHasLintingError' }, setPosition: { action: 'setPosition' }, setStopOnValidationError: { action: 'setStopOnValidationError' }, recompileFromScratch: { action: 'recompileFromScratch' }, stopCompile: { action: 'stopCompile' }, setAnimateCompileDropdownArrow: { action: 'setAnimateCompileDropdownArrow', }, }, args, } export default meta