Skip to content

Commit

Permalink
Improve styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryczko committed May 12, 2022
1 parent a4ae99d commit c118221
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Components/BurgerMenu/BurgerMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const BurgerMenu = ({ isOpen, children }: BurgerMenuProps) => {
initial="closed"
variants={variants}
id="burger_menu"
className="fixed shadow-md left-0 z-10 flex flex-col items-center justify-center w-screen top-20 bg-zinc-100 md:hidden"
className="fixed pb-2 shadow-md left-0 z-10 flex flex-col items-center justify-center w-screen top-20 bg-zinc-100 lg:hidden"
>
{children}
</motion.div>
Expand Down
8 changes: 4 additions & 4 deletions src/Components/Navigation/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ function Navigation() {
<Logo />
{!loading && user ? (
<div className="flex md:space-x-4">
<div className="hidden space-x-4 md:block">
<div className="hidden space-x-4 lg:block">
<Link to={'/survey/create'}>
<Button variant={ButtonVariant.FLAT}>Create Survey</Button>
</Link>
<Link to={'/surveys'}>
<Button variant={ButtonVariant.FLAT}>My Surveys</Button>
</Link>
</div>
<div className="sm:flex justify-center items-center hidden">
<div className="lg:flex justify-center items-center hidden">
<Menu
as="div"
className="relative inline-block text-left rounded-md"
Expand All @@ -45,7 +45,7 @@ function Navigation() {
title="Expand menu"
className="flex w-full justify-center hover:bg-zinc-200 py-1 rounded-md px-4 font-medium"
>
<p className="truncate items-center hidden justify-left sm:flex ml-4">
<p className="truncate items-center hidden justify-left sm:flex ml-2">
{user.displayName}
{user.photoURL && (
<img
Expand Down Expand Up @@ -84,7 +84,7 @@ function Navigation() {
</div>
<MenuIcon
onClick={() => setIsOpen(!isOpen)}
className="z-50 w-8 h-8 cursor-pointer md:hidden"
className="z-50 w-8 h-8 cursor-pointer lg:hidden"
/>
</div>
) : (
Expand Down
5 changes: 3 additions & 2 deletions src/Pages/SurveyCreatePage/SurveyCreatePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function SurveyCreatePage() {
</label>
<div className="flex flex-col items-center justify-center space-y-4 md:space-y-0 md:flex-row">
<DatePicker
className="w-full md:w-48 py-3 px-4 font-medium leading-none rounded-lg shadow-sm cursor-pointer focus:outline-none focus:shadow-outline text-zinc-600"
className="w-full md:w-52 block text-center mr-auto py-3 px-4 font-medium leading-none rounded-lg shadow-sm cursor-pointer focus:outline-none focus:shadow-outline text-zinc-600"
selected={startDate}
onChange={(date) => setStartDate(date)}
calendarStartDay={1}
Expand All @@ -117,8 +117,9 @@ function SurveyCreatePage() {
showPreviousMonths={false}
filterTime={filterPassedTime}
/>
<p>to</p>
<DatePicker
className="w-full md:w-48 py-3 px-4 font-medium leading-none rounded-lg shadow-sm cursor-pointer focus:outline-none focus:shadow-outline text-zinc-600"
className="w-full md:w-52 text-center block py-3 ml-auto px-4 font-medium leading-none rounded-lg shadow-sm cursor-pointer focus:outline-none focus:shadow-outline text-zinc-600"
selected={endDate}
onChange={(date) => setEndDate(date)}
calendarStartDay={1}
Expand Down
33 changes: 33 additions & 0 deletions src/datepicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,39 @@
@apply bg-white text-zinc-900;
}

.react-datepicker-time__input:focus-visible {
outline: none;
}

.react-datepicker__triangle {
display: none;
}

input[type='time']::-webkit-calendar-picker-indicator {
background: none;
display: none;
}

.react-datepicker input[type='time'] {
margin-right: 5px;
}

.react-datepicker__time-container
.react-datepicker__time
.react-datepicker__time-box
ul.react-datepicker__time-list
li.react-datepicker__time-list-item--selected {
@apply bg-indigo-200 text-indigo-900;
}

.react-datepicker__time-container
.react-datepicker__time
.react-datepicker__time-box
ul.react-datepicker__time-list
li.react-datepicker__time-list-item--selected:hover {
@apply bg-indigo-200 text-indigo-900;
}

.react-datepicker__day--selected {
@apply bg-indigo-500;
}
Expand Down

0 comments on commit c118221

Please sign in to comment.