Closed ion-willo closed 3 years ago
Hmm, it seems to be working on the xstyled.dev website. Could you supply a codesandbox?
I must be doing something wrong then. I tried it here: https://codesandbox.io/s/xstyled-v2-playground-od6si?file=/src/App.js
Maybe I'm missing some part of how this should work? Could you share what you've done?
Well, your sandbox is xstyled v2 and the text utility is a v3 feature. Are you using v2 or v3 in your application?
Regarding how the website works, it's in the repository here
Mmm... that may explain it. Looks like I was using v2. Did an npm install styled-components @xstyled/styled-components@latest
and that gave me v3.0.3
Thanks! Can confirm that worked.
🐛 Bug Report
It seems
text="x"
doesn't work as per the documentation.To Reproduce
Steps to reproduce the behavior: Open the playground. At line 66 ad the line:
<x.p text="xs">Small Text</x.p>
Note the text size of the new element.
Now change it to:
<x.p text="7xl">Small Text</x.p>
Note the text size of the new element does not change.Expected behavior
The text size should change to be as large as the Theme specifies it to be.
I may be missing a key part as to how I'm supposed to setup
text
to make it work.