Skip to content

Commit 72b6b48

Browse files
[migrate-tailwind] Use clsx for combining classes
1 parent 7490438 commit 72b6b48

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/Form/DatePickerInput/DatePickerInput.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { TextInput } from 'flowbite-react';
66
import styles from '/styles/inputs.module.scss';
77
import { useLocale } from 'src/hooks/useLocale';
88
import { CalendarEdit } from 'src/icons';
9+
import clsx from 'clsx';
910

1011
const useOptions = ({ initialValue }: FieldMetaProps<any>): IOptions => {
1112
const locale = useLocale();
@@ -31,7 +32,7 @@ const DatePickerInput = ({ field }: { field: FormField }) => {
3132
<Datepicker options={options} onChange={handleChange} show={show} setShow={setShow}>
3233
<TextInput id={field.name} {...fieldProps} helperText={meta.touched && meta.error}
3334
value={value.toLocaleDateString()} onClick={() => setShow(true)} readOnly icon={CalendarEdit}
34-
className={`${styles.input} flex items-center font-bold`} style={{ cursor: 'pointer' }}
35+
className={clsx(styles.input, 'flex items-center font-bold')} style={{ cursor: 'pointer' }}
3536
/>
3637
</Datepicker>
3738
);

0 commit comments

Comments
 (0)