compiled icon indicating copy to clipboard operation
compiled copied to clipboard

Dynamic declarations that are expanded which have optional placements don't work

Open itsdouges opened this issue 5 years ago • 0 comments

Describe the bug Declarations that are expanded with optional placement (such that they can be in any order) aren't being assigned.

const ClassNamesString = (props: { decoration: string }) => (
  <ClassNames>
    {({ css, style }) => (
      <div
        style={style}
        className={css(`
          color: red;
          text-decoration: ${props.decoration}; // <-- doesnt work
          text-decoration-line: ${props.decoration}; // <-- works
        `)}>
        hello world
      </div>
    )}
  </ClassNames>
);

Work around

For now use the long hands instead.

text-decoration-line: ${props.decoration};

itsdouges avatar Nov 11 '20 06:11 itsdouges