import { useState } from 'react' import { NumberInput, NumberInputSize } from '../../../Inputs' const NumberInputLightHouse = () => { const [age, setAge] = useState(null) const [income, setIncome] = useState(5000) const [percentage, setPercentage] = useState(50) return (
{/* Basic NumberInput */} setAge(e.target.value ? parseInt(e.target.value, 10) : null) } min={0} max={120} step={1} /> {/* Pre-filled value */} setIncome( e.target.value ? parseFloat(e.target.value) : null ) } min={0} step={100} hintText="Enter your gross monthly income" required /> {/* Percentage field */} setPercentage( e.target.value ? parseFloat(e.target.value) : null ) } min={0} max={100} step={0.5} hintText="Between 0 and 100" /> {/* Error state */} {}} min={0} max={120} error errorMessage="Age must be between 0 and 120" /> {/* Disabled state */} {}} disabled hintText="This field is disabled" /> {/* Required field */} {}} required hintText="This field is required" /> {/* Different sizes */} {}} /> {}} size={NumberInputSize.LARGE} />
) } export default NumberInputLightHouse