Storybook stories for the `WaitlistForm` component, covering default states, edge cases, theming, and interaction scenarios for visual and functional testing.
## Key Components
| Export | Description |
|---|---|
| `Default` | Base form with no pre-filled values |
| `WithDefaultEmail` | Form pre-filled with a business email |
| `GenericEmailWarning` | Triggers the consumer-domain (e.g. `gmail.com`) warning hint |
| `Submitting` | Button in loading/spinner state |
| `Success` | Post-submission success label state |
| `CustomLabels` | All configurable text props overridden |
| `NarrowContainer` | 360px constrained layout for mobile testing |
| `FailingRegistration` | `onRegister` throws to exercise toast error handling |
| `FlamingoWithCheckboxError` | Flamingo-themed variant; auto-clicks submit to expose checkbox validation error |
## Usage Example
```typescript
// Run a specific story in isolation
import { FlamingoWithCheckboxError } from './WaitlistForm.stories';
// Meta-level defaults shared across all stories
// - layout: 'padded', dark background
// - Toaster decorator for toast notifications
// - 1.5s simulated async onRegister
// - placeholder privacy/terms URLs
// Override args per-story
export const WithDefaultEmail: Story = {
args: {
defaultEmail: 'john@acme-msp.com',
},
};
```
## Notes
- All stories wrap `` with `` via a global decorator so toast notifications render correctly.
- `FlamingoWithCheckboxError` uses `useRef` + `useEffect` to programmatically click the submit button on mount, simulating an immediate validation failure without manual interaction.
- The `data-app-type="flamingo"` attribute on the wrapper activates the pink accent theme variant.