import React from 'react' import { type Meta, type StoryObj } from '@storybook/react-vite' import { DocsTemplate } from '../../../.storybook' import PopoverFormContainer from './PopoverFormContainer' import Button from '../Button/Button' const meta: Meta = { title: 'Components/Popover/PopoverFormContainer', component: PopoverFormContainer, parameters: { docs: { page: () => ( The PopoverFormContainer component ensures a consistent UI experience when placing form elements inside a popover. It provides a structured layout with a header, container, and footer, along with appropriate button styles for form actions. This component streamlines the design and presentation of form content within popovers, enhancing user interaction and visual consistency. } infoBullets={[ Utilize the PopoverFormContainer component whenever you need to include a form element within a popover, ensuring a unified UI experience. , Include a header in the container to provide a clear title or description of the form's purpose or context. , Use the container to present the form elements and input fields, arranging them in a visually organized and user-friendly manner. , ]} /> ), }, }, } export default meta type Story = StoryObj const Template: Story = { render: (args) => { return (
) }, } export const Basic: Story = { ...Template, args: { header: 'Storybook Rules', children:
Are you sure Storybook rules?
, }, } export const WithFooter: Story = { ...Template, args: { header: 'Storybook Rules', children:
Are you sure Storybook rules?
, footerChildren: (
), }, } export const NoBodyPadding: Story = { ...Template, args: { header: 'No Body Padding', children: (
This is necessary if there is content that needs to span 100% from left to right without a gap.
), noPadding: true, }, } export const NoHeaderInMobile: Story = { ...Template, args: { header: 'No Header in Mobile', children: (
Resize the window to see this in a mobile view if the{' '} usedWithMobileDrawer prop is used. The header is removed because a mobile drawer comes with a header.
), usedWithMobileDrawer: true, }, }