sullivan
Version:
Tools to quickly build interfaces in JS
19 lines (14 loc) • 391 B
JavaScript
import propertyReducer from '../helpers/property-reducer';
export default (colors = {}) => {
const bg = propertyReducer(colors, 'backgroundColor');
// background cover aye
bg.cover = {
backgroundSize: 'cover',
backgroundPosition: 'center',
backgroundRepeat: 'no-repeat'
};
bg.image = (url) => {
return {backgroundImage: `url("${url}")`};
};
return {bg};
};