"use client"; import { Transition } from "@headlessui/react"; import { type ComponentPropsWithoutRef, type ElementRef, type FormEvent, forwardRef, useState, } from "react"; function CheckIcon(props: ComponentPropsWithoutRef<"svg">) { return ( ); } function FeedbackButton( props: Omit, "type" | "className">, ) { return ( ); } const FeedbackForm = forwardRef< ElementRef<"form">, Pick, "onSubmit"> >(function FeedbackForm({ onSubmit }, ref) { return ( Was this page helpful? Yes No ); }); const FeedbackThanks = forwardRef>( // biome-ignore lint/style/useNamingConvention: function FeedbackThanks(_props, ref) { return ( Thanks for your feedback! ); }, ); export function Feedback() { const [submitted, setSubmitted] = useState(false); function onSubmit(event: FormEvent) { event.preventDefault(); // event.nativeEvent.submitter.dataset.response // => "yes" or "no" setSubmitted(true); } return ( ); }
Was this page helpful?