import { Button, Form, FormControl, FormDescription, FormItem, FormLabel, FormMessage, Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Switch, Textarea } from "@ai-ui/ui"; import type { Meta, StoryObj } from "@storybook/react"; import { Controller, useForm } from "react-hook-form"; import { useState } from "react"; type LaunchFormValues = { email: string; notifications: boolean; role: string; summary: string; }; async function waitForCondition( predicate: () => boolean, message: string, timeoutMs = 2000 ) { const startedAt = Date.now(); while (Date.now() - startedAt < timeoutMs) { if (predicate()) { return; } await new Promise((resolve) => window.setTimeout(resolve, 16)); } throw new Error(message); } function LaunchSettingsForm() { const [submitted, setSubmitted] = useState(null); const form = useForm({ defaultValues: { email: "", notifications: true, role: "design", summary: "" } }); return (
{ setSubmitted(values); })} >

Launch settings

This story uses react-hook-form with the new form primitives.

Email address Release notes and alerts will be sent here. ( Review lane The selected team becomes the primary reviewer for this launch. )} /> Launch summary