stijl icon indicating copy to clipboard operation
stijl copied to clipboard

Merge order should be reversed

Open fverloop opened this issue 7 years ago • 0 comments

When using an array on the css prop to merge styles, I expect the order to be in reverse, like CSS.

Expected:

export const H1: FramerComponent<{}> = props => {
  const style = Style({fontSize: 32});

  return <h1 css={[style, props.css]}>{props.children}</h1>;
};

Currently should do this to make it work:

export const H1: FramerComponent<{}> = props => {
  const style = Style({fontSize: 32});

  return <h1 css={[props.css, style]}>{props.children}</h1>;
};

fverloop avatar Mar 02 '18 10:03 fverloop