import clsx from 'clsx' import _ from 'lodash' import { Col } from './layout/col' import { Spacer } from './layout/spacer' export function NumberInput(props: { numberString: string onChange: (newNumberString: string) => void error: string | undefined label: string disabled?: boolean className?: string inputClassName?: string // Needed to focus the amount input inputRef?: React.MutableRefObject children?: any }) { const { numberString, onChange, error, label, disabled, className, inputClassName, inputRef, children, } = props return ( {error && (
{error}
)} {children} ) }