import clsx from 'clsx' import { ReactNode } from 'react' import React from 'react' 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?: ReactNode }) { const { numberString, onChange, error, label, disabled, className, inputClassName, inputRef, children, } = props return ( {error && (
{error}
)} {children} ) }