Skip to content

Instantly share code, notes, and snippets.

@waynevanson
Created June 18, 2021 10:07
Show Gist options
  • Save waynevanson/11b2dd94185da0fd1c11eb9e0bb36f90 to your computer and use it in GitHub Desktop.
Save waynevanson/11b2dd94185da0fd1c11eb9e0bb36f90 to your computer and use it in GitHub Desktop.
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