@gannochenko/ui.styled-components
Version:
<!-- PROJECT SHIELDS --> <!-- *** Reference links are enclosed in brackets [ ] instead of parentheses ( ). *** See the bottom of this document for the declaration of the reference variables *** for contributors-url, forks-url, etc. This is an optional, co
14 lines (13 loc) • 461 B
JavaScript
import { css } from 'styled-components';
import { transition } from './transition';
export const backgroundColor = (color = 'inherit', hoverColor, focusColor, transitionTime = 0) => css `
background-color: ${color};
&:hover {
background-color: ${hoverColor || color};
}
&:focus {
background-color: ${focusColor || color};
}
${transition('background-color', transitionTime)}
`;
//# sourceMappingURL=backgroundColor.js.map