mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 09:30:31 +03:00
Removed duplicated CSS from DateInput
This commit is contained in:
parent
3be5126e2d
commit
999b21577a
2 changed files with 3 additions and 27 deletions
|
@ -1,30 +1,6 @@
|
||||||
@import '../mixins/vertical-align';
|
@import '../mixins/vertical-align';
|
||||||
@import '../base';
|
@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 {
|
.react-datepicker__close-icon.react-datepicker__close-icon {
|
||||||
@include vertical-align();
|
@include vertical-align();
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ export const DateInput = (props: DateInputProps) => {
|
||||||
const ref = useRef<{ input: HTMLInputElement }>();
|
const ref = useRef<{ input: HTMLInputElement }>();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="date-input-container">
|
<div className="icon-input-container">
|
||||||
<DatePicker
|
<DatePicker
|
||||||
{...props}
|
{...props}
|
||||||
popperModifiers={[
|
popperModifiers={[
|
||||||
|
@ -26,14 +26,14 @@ export const DateInput = (props: DateInputProps) => {
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
dateFormat={dateFormat ?? STANDARD_DATE_FORMAT}
|
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
|
// @ts-expect-error The DatePicker type definition is wrong. It has a ref prop
|
||||||
ref={ref}
|
ref={ref}
|
||||||
/>
|
/>
|
||||||
{showCalendarIcon && (
|
{showCalendarIcon && (
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
icon={calendarIcon}
|
icon={calendarIcon}
|
||||||
className="date-input-container__icon"
|
className="icon-input-container__icon"
|
||||||
onClick={() => ref.current?.input.focus()}
|
onClick={() => ref.current?.input.focus()}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue