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
Theme
Overwriting Theme with xstyled v3.1 or later will cause a type error if you specify a value that does not exist in theme into utility props.
xstyled v3.1
Use xstyled with TypeScript
<x.div w={123} />
<x.div w={false}>
If expect the same behavior as with v3.0, it should work like this:
v3.0
false
@xstyled/styled-components v3.5.1
@xstyled/styled-components v3.0.3
npx envinfo --system --binaries --npmPackages @xstyled/system,@xstyled/styled-components,styled-components --markdown --clipboard
Paste the results here:
## System: - OS: macOS 12.1 - CPU: (10) arm64 Apple M1 Max - Memory: 33.10 GB / 64.00 GB - Shell: 5.8 - /opt/homebrew/bin/zsh ## Binaries: - Node: 16.13.0 - ~/.asdf/installs/nodejs/16.13.0/bin/node - Yarn: 1.22.17 - /opt/homebrew/bin/yarn - npm: 8.1.0 - ~/.asdf/plugins/nodejs/shims/npm ## npmPackages: - styled-components: ^5.3.0 => 5.3.3
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
🐛 Bug Report
Overwriting
Theme
withxstyled v3.1
or later will cause a type error if you specify a value that does not exist in theme into utility props.To Reproduce
Theme
by referring to the documentUse xstyled with TypeScript
.<x.div w={123} />
or<x.div w={false}>
Expected behavior
If expect the same behavior as with
v3.0
, it should work like this:false
Link to repl or repo (highly encouraged)
@xstyled/styled-components v3.5.1
& overrideTheme
https://codesandbox.io/s/red-dust-96qy1
@xstyled/styled-components v3.5.1
& not overrideTheme
https://codesandbox.io/s/great-darwin-m4b64
@xstyled/styled-components v3.0.3
& overrideTheme
https://codesandbox.io/s/blissful-pond-o7hnn
Run
npx envinfo --system --binaries --npmPackages @xstyled/system,@xstyled/styled-components,styled-components --markdown --clipboard
Paste the results here:
The text was updated successfully, but these errors were encountered: