diff --git a/plugins/xcmetrics/src/components/DatePickerComponent/DatePickerComponent.tsx b/plugins/xcmetrics/src/components/DatePickerComponent/DatePickerComponent.tsx index c6cc2eded5..854fbbd87f 100644 --- a/plugins/xcmetrics/src/components/DatePickerComponent/DatePickerComponent.tsx +++ b/plugins/xcmetrics/src/components/DatePickerComponent/DatePickerComponent.tsx @@ -18,6 +18,7 @@ import { createStyles, InputBase, InputProps, + makeStyles, Theme, Typography, withStyles, @@ -50,6 +51,13 @@ const BootstrapInput = withStyles((theme: Theme) => }), )(InputBase); +const useStyles = makeStyles({ + root: { + display: 'flex', + flexDirection: 'column', + }, +}); + interface DatePickerProps { label: string; onDateChange?: (date: string) => void; @@ -59,16 +67,19 @@ export const DatePickerComponent = ({ label, onDateChange, ...inputProps -}: InputProps & DatePickerProps) => ( - <> - {label} - - onDateChange?.(event.target.value)} - {...inputProps} - /> - > -); +}: InputProps & DatePickerProps) => { + const classes = useStyles(); + + return ( + + {label} + onDateChange?.(event.target.value)} + {...inputProps} + /> + + ); +};