import { useForm } from '@inertiajs/react'; import type { FormEvent, ReactNode } from 'react'; import { useStorefront } from '../context'; import { storefrontText } from '../text'; import { formatPrice } from '../theme'; import { Container, SfLink } from '../ui'; const inputClass = 'w-full rounded-(--sf-radius) border border-(--sf-border) bg-(--sf-bg) px-3 py-2.5 text-base text-(--sf-fg) outline-none focus-visible:border-(--sf-primary) focus-visible:ring-2 focus-visible:ring-(--sf-primary)/30'; function Field({ id, label, error, children, }: { id: string; label: string; error?: string; children: ReactNode; }) { return (
{error}
)}