diff --git a/package.json b/package.json index 58c092c..e34ff3e 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "react-dom": "^16.12.0", "react-redux": "^7.2.3", "react-select": "^1.3.0", + "react-responsive": "^9.0.0-beta.5", "redux": "^4.0.5", "redux-actions": "^2.6.5", "redux-logger": "^3.0.6", diff --git a/src/components/DateRangePicker/DateInput/styles.scss b/src/components/DateRangePicker/DateInput/styles.scss index 0f01a28..4ac3434 100644 --- a/src/components/DateRangePicker/DateInput/styles.scss +++ b/src/components/DateRangePicker/DateInput/styles.scss @@ -18,7 +18,6 @@ } .date-range-input { - width: 230px; margin-top: -12px; font-size: $font-size-sm; diff --git a/src/components/DateRangePicker/index.jsx b/src/components/DateRangePicker/index.jsx index 96b0d27..15e8815 100644 --- a/src/components/DateRangePicker/index.jsx +++ b/src/components/DateRangePicker/index.jsx @@ -551,15 +551,15 @@ function DateRangePicker(props) { return isBeforeDay(preview.endDate, range.startDate); }; - const className = ` - ${focusedRange[1] === 1 && styles.endDate} - ${" "} - ${range.startDate && range.endDate && styles.isRange} - ${" "} - ${isInvalidPreview() && styles.isInvalidPreview} - ${" "} - ${(errors.startDate || errors.endDate) && styles.isErrorInput} - `; + const className = `${ + focusedRange[1] === 1 && styles.endDate || "" + } ${ + range.startDate && range.endDate && styles.isRange || "" + } ${ + isInvalidPreview() && styles.isInvalidPreview || "" + } ${ + (errors.startDate || errors.endDate) && styles.isErrorInput || "" + }`; return (
diff --git a/src/components/DateRangePicker/style.scss b/src/components/DateRangePicker/style.scss index c0bd6f1..2e8467a 100644 --- a/src/components/DateRangePicker/style.scss +++ b/src/components/DateRangePicker/style.scss @@ -57,24 +57,25 @@ $darkGreen: #0AB88A;; @include phone { .rdrDateRangePickerWrapper { position: relative !important; - width: 100vw !important; + width: 100% !important; flex-direction: column-reverse; align-items: center; justify-content: flex-end; padding: 0 20px; + border-radius: 0 !important; .rdrDefinedRangesWrapper { - width: 100vw; - padding-bottom: 10px; - .rdrStaticRanges { display: inline-flex; flex-direction: row; justify-content: space-around; + flex-wrap: wrap; margin-top: 10px !important; - border-bottom: 1px solid $tc-gray-20; - width: 100vw; - padding-bottom: 10px; + width: calc(100% - 40px); + + .rdrStaticRange { + width: 50%; + } .rdrStaticRangeLabel { font-size: 14px; @@ -83,10 +84,6 @@ $darkGreen: #0AB88A;; > button:hover .rdrStaticRangeLabel { background-color: $green; } - - & > *:last-child { - display: none; - } } } @@ -137,14 +134,14 @@ $darkGreen: #0AB88A;; .rdrDateRangePickerWrapper { z-index: 15; position: relative; - background: $tc-white; + // background: $tc-white; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; overflow: hidden; width: 455px; .rdrDefinedRangesWrapper { - width: unset; + width: 100%; border: none; .rdrStaticRanges { @@ -164,6 +161,10 @@ $darkGreen: #0AB88A;; background-color: $green; } } + + .rdrInputRanges { + display: none; + } } } @@ -373,7 +374,6 @@ $darkGreen: #0AB88A;; } .dateInputWrapper { - display: inline-flex; position: relative; text-align: left; } @@ -395,26 +395,32 @@ $darkGreen: #0AB88A;; z-index: 10; @include phone { - width: 100vw; + width: 100%; position: fixed; top: 0; left: 0; - right: 0; + right: 20px; bottom: 0; z-index: 15; - padding: 65px 0 0; + padding: 187px 0 0; border: 0; border-radius: 0; - } + background: rgba(#2A2A2A, 0.6); - .calendar-footer { - width: 100%; + @include down(320px) { + padding: 40px 0 0; + } - @include phone { - padding: 0 20px; + .calendar-footer { + margin: 0 20px; + padding: 20px 0; } } + .calendar-footer { + background: $tc-white; + } + .calendar-button { @include roboto-bold; @@ -439,20 +445,18 @@ $darkGreen: #0AB88A;; } } -.endDate { +@include tablet { .calendar-container, .calendar-inner-container { - left: 0; + right: 0; } :global { .rdrDateRangePickerWrapper { - @include tablet { - .calendar-container, - .calendar-inner-container { - right: auto; - left: 62px; - } + .calendar-container, + .calendar-inner-container { + right: 62px; + left: auto; } } } diff --git a/src/components/Pagination/index.jsx b/src/components/Pagination/index.jsx index ee625ef..503899f 100644 --- a/src/components/Pagination/index.jsx +++ b/src/components/Pagination/index.jsx @@ -105,14 +105,14 @@ const Pagination = ({ length, pageIndex, pageSize, onChange }) => { onChange={onChangePageSize} size="xs" /> + per page