import { useState } from "react" import { Button, Drawer, Input, Label } from "@medusajs/ui" export default function DrawerWithForm() { const [name, setName] = useState("") const [open, setOpen] = useState(false) const [submitted, setSubmitted] = useState(false) function handleSubmit(e: React.FormEvent) { e.preventDefault() setSubmitted(true) setOpen(false) } return (
Simple Form
setName(e.target.value)} placeholder="Enter your name" />
{submitted && (
Form submitted with name {name}
)}
) }