From 999b21577afaf0e592bc83ac6ef9eb090d89b5b9 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Tue, 14 Mar 2023 08:50:53 +0100 Subject: [PATCH] Removed duplicated CSS from DateInput --- src/utils/dates/DateInput.scss | 24 ------------------------ src/utils/dates/DateInput.tsx | 6 +++--- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/src/utils/dates/DateInput.scss b/src/utils/dates/DateInput.scss index f68453dc..d61fd0d2 100644 --- a/src/utils/dates/DateInput.scss +++ b/src/utils/dates/DateInput.scss @@ -1,30 +1,6 @@ @import '../mixins/vertical-align'; @import '../base'; -.date-input-container { - position: relative; -} - -.date-input-container__input { - padding-right: 35px !important; -} - -.date-input-container__input:not(:disabled) { - background-color: var(--primary-color) !important; -} - -.card .date-input-container__input:not(:disabled), -.dropdown .date-input-container__input:not(:disabled) { - background-color: var(--input-color) !important; -} - -.date-input-container__icon { - @include vertical-align(); - - right: .75rem; - cursor: pointer; -} - .react-datepicker__close-icon.react-datepicker__close-icon { @include vertical-align(); diff --git a/src/utils/dates/DateInput.tsx b/src/utils/dates/DateInput.tsx index 07fd96cc..9f32aaa9 100644 --- a/src/utils/dates/DateInput.tsx +++ b/src/utils/dates/DateInput.tsx @@ -16,7 +16,7 @@ export const DateInput = (props: DateInputProps) => { const ref = useRef<{ input: HTMLInputElement }>(); return ( -
+
{ }, ]} dateFormat={dateFormat ?? STANDARD_DATE_FORMAT} - className={classNames('date-input-container__input form-control', className)} + className={classNames('icon-input-container__input form-control', className)} // @ts-expect-error The DatePicker type definition is wrong. It has a ref prop ref={ref} /> {showCalendarIcon && ( ref.current?.input.focus()} /> )}