Fixed console errors, added Delay to themeselector transition

Transition now only rounds the corners after the dropdown is retracted
This commit is contained in:
Neshura 2022-12-17 21:35:40 +01:00
parent f178058578
commit 5ee7c8ef2e
No known key found for this signature in database
GPG key ID: ACDF5B6EBECF6B0A
2 changed files with 5 additions and 3 deletions

View file

@ -2,7 +2,7 @@ import styled from 'styled-components'
import Link from 'next/link';
interface ActivePropType {
active?: false | true;
active?: number;
}
export const NavWrap = styled.div`

View file

@ -1,11 +1,11 @@
import styled from 'styled-components';
interface DisplayPropType {
show?: false | true;
show?: number;
}
interface ActivePropType {
active?: false | true;
active?: number;
}
export const ThemeDropDown = styled.div`
@ -28,6 +28,7 @@ export const ThemeDropDownButton = styled.button<DisplayPropType>`
transition-property: color, border-bottom-left-radius, border-bottom-right-radius;
transition-timing-function: ease;
transition-duration: 0.15s;
transition-delay: 0, ${ props => props.show ? "0s" : "0.6s" };
&:focus,:hover {
color: ${({ theme }) => theme.colors.secondary};
@ -62,6 +63,7 @@ export const ThemeDropDownOptions = styled.div<DisplayPropType>`
export const ThemeDropDownOption = styled.button<ActivePropType>`
color: ${ props => props.active ? ({ theme }) => theme.colors.secondary : ({ theme }) => theme.colors.primary };
background-color: ${({ theme }) => theme.colors.background};
cursor: pointer;
align-self: center;
border: 0px solid;
padding: 0.2rem 0.5rem;