import React, { useState } from 'react'; import { StoryObj, Meta } from '@storybook/react'; import Popup from './Popup'; import Button from '../Button'; const meta: Meta = { title: 'Components/Popup', component: Popup, parameters: { layout: 'centered', }, tags: ['autodocs'], }; type Story = StoryObj; const defaultArgs = { isOpen: false, type: 'info', headerTitle: 'Popup Header', continueButtonLabel: 'Continue', cancelButtonLabel: 'Cancel', continueButtonDisable: false, cancelButtonDisable: false, onContinueClick: () => {}, onCancelClick: () => {}, }; export const Controlled: Story = { args: { ...defaultArgs, isOpen: true, type: 'warning', headerTitle: 'Warning', headerText: 'Delete', continueButtonLabel: 'Delete', cancelButtonLabel: 'Cancel', continueButtonDisable: true, cancelButtonDisable: false, }, render: () => { const [open, setOpen] = useState(false); return ( <>