Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional props don't seem to work as documented #2

Open
ptim opened this issue Aug 15, 2019 · 0 comments
Open

Conditional props don't seem to work as documented #2

ptim opened this issue Aug 15, 2019 · 0 comments

Comments

@ptim
Copy link

ptim commented Aug 15, 2019

Not sure if I'm doing something wrong here - this example is a slight modification of the example in https://github.com/mephju/classed-components#conditional-classes

Tx

const medium = false

const MyComponent = classed.div`
  text-sm
  text-base ${medium}
  text-xl ${props => props.isHeader}
`

JSX:

<MyComponent isHeader={false}>Header</MyComponent>

Expected:

<div class="text-sm">Header</div>

Actual:

<div class="text-sm text-base text-xl">Header</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant