themed-styling / core

Quick, modular and responsive styling for styled-components with theme support.
https://www.npmjs.com/package/@themed-styling/core
GNU General Public License v3.0
0 stars 1 forks source link

Bug: prop color with fallback fails css parsers #117

Closed hexagon6 closed 4 years ago

hexagon6 commented 4 years ago

with storyshots I get the following error:

Error: undefined:18:49: property missing ':'

I assume that @themed-styling/core generates invalid css when a fallback value or a default parameter is passed in React.

e.g.

const Icon = ({ icon: Icon, alt, color }) =>
    <Icon
      color={color || 'colors.primary'}
      aria-label={alt}
    /> 

this fails.

const Icon = ({ icon: Icon, alt, color }) =>
    <Icon
      color={color}
      aria-label={alt}
    /> 

this works