"use client"; import { useState } from "react"; import { useMediaQuery } from "../../hooks/useMediaQuery"; import HeaderLockup from "../../components/type/HeaderLockup"; import TextInput from "../../components/controls/TextInput"; /** * Text page for the create flow * * Displays a text input field for user input using HeaderLockup and TextInput components. * Responsive sizing: uses L/M for HeaderLockup and medium/small for TextInput based on 640px breakpoint. */ export default function TextPage() { const isMdOrLarger = useMediaQuery("(min-width: 640px)"); const [value, setValue] = useState(""); const maxLength = 48; const characterCount = value.length; return (
{/* HeaderLockup: Left justification, L size at 640px+, M size below 640px */} {/* TextInput: medium size at 640px+, small size below 640px */}
setValue(e.target.value)} inputSize={isMdOrLarger ? "medium" : "small"} formHeader={false} textHint={`${characterCount}/${maxLength}`} maxLength={maxLength} />
); }