import { PropsWithChildren } from 'react'; import { InputGroup } from '@chakra-ui/react'; import { cx } from '../../../utils/styleUtils'; import TimeInput from './TimeInput'; import style from './TimeInputWithButton.module.scss'; interface TimeInputWithButtonProps { name: T; submitHandler: (field: T, value: string) => void; time?: number; hasDelay?: boolean; disabled?: boolean; placeholder: string; } export default function TimeInputWithButton(props: PropsWithChildren>) { const { name, submitHandler, time, hasDelay, placeholder, disabled, children } = props; const inputClasses = cx([style.timeInput, hasDelay ? style.delayed : null]); return ( name={name} submitHandler={submitHandler} time={time} placeholder={placeholder} align='left' disabled={disabled} /> {children} ); }