diegohaz / diegohaz/styled-tools

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

Open
#71 1 comment 0 reactions 0 assignees View on GitHub
enhancement PR welcome
Dominant language
JavaScript
Stars
799
Forks
24
PR merge metrics
No merged PRs in 30d

Description

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)?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.