style: input text alignment

This commit is contained in:
Carlos Valente
2024-05-24 09:15:53 +02:00
committed by Carlos Valente
parent 71a7fe96d1
commit b8d5a30caf
3 changed files with 4 additions and 7 deletions
@@ -11,11 +11,12 @@ interface TimeInputProps<T extends string> {
time?: number;
placeholder: string;
disabled?: boolean;
align?: 'left' | 'center';
className?: string;
}
export default function TimeInput<T extends string>(props: TimeInputProps<T>) {
const { name, submitHandler, time = 0, placeholder, disabled, className } = props;
const { name, submitHandler, time = 0, placeholder, disabled, align = 'center', className } = props;
const { emitError } = useEmitLog();
const inputRef = useRef<HTMLInputElement | null>(null);
const [value, setValue] = useState<string>('');
@@ -135,7 +136,7 @@ export default function TimeInput<T extends string>(props: TimeInputProps<T>) {
maxWidth='7.5em'
letterSpacing='1px'
autoComplete='off'
textAlign='center'
textAlign={align}
/>
);
}
@@ -6,7 +6,3 @@ $input-delayed-border-color: $ontime-delay-text;
border: 1px solid $input-delayed-border-color;
}
}
.inputField {
text-align: left;
}
@@ -28,7 +28,7 @@ export default function TimeInputWithButton<T extends string>(props: PropsWithCh
submitHandler={submitHandler}
time={time}
placeholder={placeholder}
className={style.inputField}
align='left'
disabled={disabled}
/>
{children}