Skip to content

unable to interpolate ${prop('__')} #71

@Tycholiz

Description

@Tycholiz

Trying to make an Icon component a little more modular by allowing a prop for palette level to be passed. Here is the original:

  color: ${ifProp('palette', palette({ grayscale: 0 }, 3), 'currentcolor')};

and here is what I am trying to change it to:

  color: ${ifProp('palette', palette({ grayscale: 0 }, **prop('paletteLevel')**), 'currentcolor')};

however this doesn't work for me. Should the function prop('paletteLevel') not evaluate to the prop I pass in (2 in this case)?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions