-
Notifications
You must be signed in to change notification settings - Fork 119
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
Button disabled style not rendering #2603
Comments
Hey @yagudaev, Thanks for pointing out. We will send a PR to nativewind to update this. Nativewind v4.1 supports this. Feature, before that we used to have |
@Viraj-10 Be careful when you replace those styles, when I switch over to |
Hey @stefan-schweiger, Can you share your repo? Also using |
@Viraj-10 here is my reproduction https://github.com/stefan-schweiger/gluestack-repro I have included once the latest version of button and once a "new" version of button with the When on iOS you press for example directly on the text of secondary+outline with the current implementation you will see only the border will change color (but text stays the same). With the "new" implementation only the text changes the color and the border stays the same, but when you press not directly on the text you get the old behavior of only the border changing color. Also if you try it on primary+solid you will notice the highlighting on iOS which can be disabled with Ideally both text and the border should change color as defined in the styles no matter where on the button you press. Also another "bug" I noticed in the button component is this styling which uses primary for a secondary style:
|
Hey @stefan-schweiger, I have created a PR with newest updates. When you write To over come this and provide a better api we have introduced If you want to add more components use |
Hi @Viraj-10, I've spent hours trying to debug why the buttons' styles don't change when it's being pressed and it seems to be the same issue. The "active" style (data-[active=true]) only works on browsers and it is not being applied in iOS simulator or on actual iPhone devices. If I change "data-[active=true]:" to "active:" in "ui/button/index.tsx", then it works in iOS simulator/device. So I guess the "data-*" attribute is not being applied correctly on iOS devices? Or how can I fix this? |
Description
Disabled style is not applied to button
CodeSandbox/Snack link
TBD
Steps to reproduce
Super simple little bug:
data-[disabled=true]
is the wrong property, it needs t obedisabled:opacity-40
.It should fix it.
https://www.nativewind.dev/core-concepts/states#form-states-
Data selectors are web-only
gluestack-ui Version
@gluestack-ui/button 1.0.8
Platform
Other Platform
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: