From 768949c9ec28436093394d02a4163494c6f5503b Mon Sep 17 00:00:00 2001 From: Ivan Samozhenov Date: Mon, 26 Feb 2024 09:04:01 +0300 Subject: [PATCH] Brush layout of calendar and datepicker --- src/components/Calendar/Calendar.jsx | 1 + src/components/Calendar/DayUnit/style.css | 2 - src/components/Calendar/style.css | 16 ++++++- src/components/DatePicker/DatePicker.jsx | 54 ++++++++++++----------- src/components/DatePicker/style.css | 15 ++++--- src/styles/App.css | 11 +++++ 6 files changed, 63 insertions(+), 36 deletions(-) diff --git a/src/components/Calendar/Calendar.jsx b/src/components/Calendar/Calendar.jsx index 9642154..d9bd571 100644 --- a/src/components/Calendar/Calendar.jsx +++ b/src/components/Calendar/Calendar.jsx @@ -35,6 +35,7 @@ const Calendar = ({ }; return (
+

Календарь

-
- +
- +
+ + +
+ +
); }; diff --git a/src/components/DatePicker/style.css b/src/components/DatePicker/style.css index fa06170..731a0c4 100644 --- a/src/components/DatePicker/style.css +++ b/src/components/DatePicker/style.css @@ -1,9 +1,14 @@ .datepicker-wrapper { + background-color: #eff3f6; +} + +.datepicker { display: flex; justify-content: space-between; - background-color: #eff3f6; padding: 12px; box-sizing: border-box; + max-width: 650px; + margin: 0 auto; } .date-control { @@ -13,12 +18,6 @@ padding: 0; width: 34px; height: 34px; - cursor: pointer; -} - -.button-disabled { - background-color: transparent; - cursor: not-allowed; } .arrow-icon { @@ -42,6 +41,8 @@ font-weight: 600; font-size: 14px; display: inline-block; + width: 100%; + height: 100%; } .calendar-icon { diff --git a/src/styles/App.css b/src/styles/App.css index 3e41383..8149e7c 100644 --- a/src/styles/App.css +++ b/src/styles/App.css @@ -1,3 +1,14 @@ body { font-family: Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif +} + +button { + user-select: none; + -webkit-user-select: none; + cursor: pointer; +} + +.button-disabled { + background-color: transparent; + cursor: not-allowed; } \ No newline at end of file