We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In this example:
const Button = styled.button` color: ${prop('theme.colors.white', '#fff')}; font-size: ${ifProp({ size: 'large' }, prop('theme.sizes.lg', '20px'), prop('theme.sizes.md', '14px'))}; background-color: ${prop('tgeme.colors.black', '#000')}; ${ifProp('disabled', css` background-color: ${prop('theme.colors.gray', '#999')}; pointer-events: none; `)} `
we have ${ifProp('disabled', css but css is neither defined nor needed.
${ifProp('disabled', css
css
So it should be like that:
const Button = styled.button` color: ${prop('theme.colors.white', '#fff')}; font-size: ${ifProp({ size: 'large' }, prop('theme.sizes.lg', '20px'), prop('theme.sizes.md', '14px'))}; background-color: ${prop('tgeme.colors.black', '#000')}; ${ifProp('disabled', ` background-color: ${prop('theme.colors.gray', '#999')}; pointer-events: none; `)} `
The text was updated successfully, but these errors were encountered:
Hey, @bslipek.
That's css from styled-components: https://www.styled-components.com/docs/api#css
styled-components
And that's needed to handle interpolations (prop('theme.colors...). For instance, try to remove css here: https://www.webpackbin.com/bins/-KmWrYsZMKqn0pbntMy3
prop('theme.colors...
I would accept a PR adding a import styled, { css } from 'styled-components' though, if you think it might help to avoid the confusion.
import styled, { css } from 'styled-components'
Sorry, something went wrong.
No branches or pull requests
In this example:
we have
${ifProp('disabled', css
butcss
is neither defined nor needed.So it should be like that:
The text was updated successfully, but these errors were encountered: