mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-10 18:03:47 +00:00
refactor: style cleanups and migrations
fix: close modal with button refactor: small type improvements refactor: migrate time inputs refactor: migrate tooltips refactor: prevent component resizing
This commit is contained in:
committed by
Carlos Valente
parent
6facd6a666
commit
17a7d035bf
@@ -18,8 +18,20 @@ interface NullableTimeInputProps<T extends string> {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export default function NullableTimeInput<T extends string>(props: NullableTimeInputProps<T>) {
|
||||
const { id, name, submitHandler, time, emptyDisplay, placeholder, disabled, align = 'center', className } = props;
|
||||
/**
|
||||
* Similar to TimeInput, but allows clearing the time value
|
||||
*/
|
||||
export default function NullableTimeInput<T extends string>({
|
||||
id,
|
||||
name,
|
||||
submitHandler,
|
||||
time,
|
||||
emptyDisplay,
|
||||
placeholder,
|
||||
disabled,
|
||||
align = 'center',
|
||||
className,
|
||||
}: NullableTimeInputProps<T>) {
|
||||
const inputRef = useRef<HTMLInputElement | null>(null);
|
||||
const [value, setValue] = useState<string>('');
|
||||
const ignoreChange = useRef(false);
|
||||
|
||||
Reference in New Issue
Block a user