Created
June 18, 2021 10:07
-
-
Save waynevanson/11b2dd94185da0fd1c11eb9e0bb36f90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { lighten } from "polished"; | |
import { css } from "styled-components"; | |
export const lightenOnUserInteraction = css<{ color: string }>` | |
background-color: ${(props) => props.color}; | |
:hover, | |
:focus { | |
background-color: ${(props) => lighten(0.13, props.color)}; | |
} | |
:active { | |
background-color: ${(props) => lighten(0.26, props.color)}; | |
} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment