Closed AlfonzAlfonz closed 3 years ago
‼️ Deploy request for xstyled rejected. Learn more about Netlify's sensitive variable policy
🔨 Explore the source changes: 4cc2a74d8feebde01fdb1f6e8cfb6ab0215ad154
Merging #297 (4cc2a74) into main (250d21f) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## main #297 +/- ##
=======================================
Coverage 92.74% 92.74%
=======================================
Files 60 60
Lines 1255 1255
Branches 244 244
=======================================
Hits 1164 1164
Misses 91 91
Impacted Files | Coverage Δ | |
---|---|---|
packages/system/src/defaultTheme.ts | 100.00% <ø> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 250d21f...4cc2a74. Read the comment docs.
unfortunately if I want to render button as an link I need to use "aria-disabled" attribute
Could you explain this?
Yeah, here is a simple use case. Sometimes I need to create button, but I can't use the button element and if I want to make it disabled I need to use aria-disabled attribute.
https://codesandbox.io/s/angry-matsumoto-huzym?file=/src/App.js
Hello @AlfonzAlfonz, can you update documentation? I think there is a page where it is described.
Docs should be updated now :)
Thanks!
xstyled has disabled state which allows to style elements which support disabled attribute, unfortunately if I want to render button as an link I need to use "aria-disabled" attribute. Solution is straightforward, change the
disabled
state so it includes&[aria-disabled=true]
. I know that I can make the change locally in the theme, but I think it is important to include it in the library.Summary
Chakra ui has similar concept to the states and their implementation of disabled includes. https://chakra-ui.com/docs/features/style-props#pseudo
Test plan