-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
bug: Input components with parent labels not working when disabled #2910
Comments
Thank you @PatrickMunsey
for reporting issues. It helps daisyUI a lot 💚
|
I see. But it doesn't make sense if a disabled input applies style to the parent. Let me know if you have any questions |
Hi @saadeghi , The specific use case I was trying to fulfill was input with text label inside while disabled. The code snippet suggested adding I followed your suggestion of adding Example of inside text labels from daisyUI docs <label className="input input-bordered flex items-center gap-2">
<input type="text" className="grow" placeholder="Search" disabled/>
<kbd className="kbd kbd-sm">⌘</kbd>
<kbd className="kbd kbd-sm">K</kbd>
</label> Adding
|
You can use |
What version of daisyUI are you using?
4.7.3
Which browsers are you seeing the problem on?
All browsers
Reproduction URL
https://play.tailwindcss.com/UUcY4t1qbS
Describe your issue
When wrapping an input component with a label as seen in Text Input and checkbox. The styling is not working for when the input is in the disabled state.
I've had to re write the disabled behaviour for the checkbox using peer modifiers but can't get something working for the text input field. It would be good if you could provide an approach that didn't require re writing disabled behaviours when using parent or peer labels. Is this even possible?
What it looks like disabled when using a parent label ❌
What it looks like just styling the input component ✅
The text was updated successfully, but these errors were encountered: