import type { Meta, StoryObj } from '@storybook/react'; import React from 'react'; import { MapDrawToolbar } from './map-draw-toolbar'; import type { MapDrawMode } from '../map/use-map-drawing'; const meta: Meta = { title: 'UI/MapDrawToolbar', component: MapDrawToolbar, parameters: { layout: 'centered' }, }; export default meta; type Story = StoryObj; function Controlled(args: React.ComponentProps) { const [active, setActive] = React.useState(null); return (

Modo: {active ?? 'seleção'}

); } /** Polygon and circle, plus an explicit idle state. */ export const Default: Story = { args: { active: null, onChange: () => {} }, render: args => , }; export const AllModes: Story = { args: { active: null, onChange: () => {}, modes: ['polygon', 'circle', 'rectangle'] }, render: args => , };