Fixed console errors, added Delay to themeselector transition
Transition now only rounds the corners after the dropdown is retracted
This commit is contained in:
parent
f178058578
commit
5ee7c8ef2e
2 changed files with 5 additions and 3 deletions
|
@ -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`
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue