joyent-portal/spikes/css/aphrodite/src/mixins/hover-transition.js
2016-10-19 15:04:20 +01:00

37 lines
544 B
JavaScript

const transition = 'ease-in-out all 0.5s';
const types = {
button: ({
type,
color,
hover
}) => {
return {
backgroundColor: color,
transition,
':hover': {
backgroundColor: hover,
transition
}
};
},
text: ({
type,
color,
hover
}) => {
return {
color,
transition,
':hover': {
color: hover,
transition,
textDecoration: 'underline'
}
};
}
};
export default (props) => {
return types[props.type](props);
};