import type { Meta, StoryObj } from '@storybook/react'; import Zoom, { type ZoomProps } from './Zoom'; const meta: Meta = { argTypes: { minimapPosition: { control: 'select', options: ['top-left', 'top-right', 'bottom-left', 'bottom-right'] }, scaleMax: { control: { max: 16, min: 0.4, step: 0.2, type: 'range' } }, scaleMin: { control: { max: 16, min: 0.4, step: 0.2, type: 'range' } }, showMinimap: { control: 'boolean' } }, component: Zoom }; export default meta; type Story = StoryObj; const Content = (): JSX.Element => { return ( ); }; const Template = ({ children, ...args }: ZoomProps): JSX.Element => (
{children}
); const TemplateResponsive = ({ redCircleXPosition, redCircleYPosition, ...args }: ZoomProps): JSX.Element => (
{() => ( )}
); export const WithoutMinimap: Story = { args: { children: Content }, render: Template }; export const WithMinimap: Story = { args: { children: Content, showMinimap: true }, render: Template }; export const WithMinimapPosition: Story = { args: { children: Content, minimapPosition: 'bottom-right', showMinimap: true }, render: Template }; export const Playground: Story = { args: { children: Content, showMinimap: true }, argTypes: { redCircleXPosition: { control: { max: 2600, min: 400, step: 10, type: 'range' } }, redCircleYPosition: { control: { max: 2600, min: 400, step: 10, type: 'range' } } }, render: TemplateResponsive };