Created
April 8, 2018 18:27
-
-
Save cogell/1004b3c3bb6ff58d035093bc09923ff3 to your computer and use it in GitHub Desktop.
Quick Styled-Components Interactions
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 ColorUtils from './colors'; | |
const interactive = (attr, color) => | |
` | |
&:hover { | |
${attr}: ${ColorUtils.hover(color)}; | |
} | |
&:active { | |
${attr}: ${ColorUtils.active(color)}; | |
} | |
&:focus { | |
${attr}: ${ColorUtils.focus(color)}; | |
} | |
&:disabled { | |
${attr}: ${ColorUtils.disabled(color)}; | |
} | |
${attr}: ${color}; | |
`; | |
export default interactive; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment