-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
IconField: icons do not appear inside the visual input area in Tailwind #7042
IconField: icons do not appear inside the visual input area in Tailwind #7042
Comments
@jambudipa this should get you started: https://stackblitz.com/edit/1tubmv?file=src%2FApp.tsx |
Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days. |
Thank you for that @melloware I have discovered the problem. It appears there is no tailwind passthrough config for the Essentially, I copied the tailwind passthrough config from the repo and tweaked it for my own styling:
Perhaps this is entirely the wrong approach? Or perhaps the config for this / these components was overlooked for tailwind? |
It sounds like a bug and that it needs to be added to the default TailWind config. |
Aha ok, thanks. Is there anything I need to do? |
well you can submit a PR if you figure out what Tailwind styles need to be applied? |
Ok, well I will take a look, try to reproduce the styles of the demo. |
Hey @jambudipa @melloware , I created a PR that should fix the lack of Tailwind styling. The main issue I found is that @melloware Please look at the method I have implemented and confirm if it works. I am not sure if PrimeReact already has an internal library that handles this case, if it does please LMK and I will refactor. |
fix: #7042 Add Tailwind styling for IconField
Describe the bug
I am unable to create a Stackblitz because the imports of primereact/inputicon and primereact/iconfield do not appear to work. I think I need help with that initially!
When using
IconField
, like this:...the icon is rendered outside the box.
Reproducer
No response
System Information
System:
OS: macOS 15.0
CPU: (20) arm64 Apple M1 Ultra
Memory: 974.88 MB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v20.11.1/bin/yarn
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
pnpm: 9.4.0 - /opt/homebrew/bin/pnpm
Browsers:
Chrome: 127.0.6533.100
Safari: 18.0
Steps to reproduce the behavior
...this will be easier when I can get Stackblitz to work
Expected behavior
Icon appears inside the input area
The text was updated successfully, but these errors were encountered: