-
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
Support for svg element in icon properties #971
Comments
I'll work on it and get back to you. |
Will you also add support for element for <Button as well? |
^^ is it in the pipeline or not? |
ping |
I am evaluating possible React UI libraries for a new project and PrimeReact seems to be such a good fit (much better IMHO than all those other overhyped React UI libraries). Unfortunately, the missing SVG icon support is quite a dealbreaker. I really hope that this will be integrated. |
Hi all, Sorry for the delayed response. I've added templating support to most components. In this way, users will be able to customize icons and other default structures as they wish. For example;
For all Menu components, Users use 'template' option; #1783 I made such improvements to some components like this according to user requests. Therefore, it will be easier to make such improvements if we go component-focused. In which components do you want to customize the icons? |
Thanks for the very fast response and help. I just made a quick try to get an SVG component to the left side in an input field, but failed:
I also tried some Ant stuff and there you wrap the SVG in their Icon component and everything seems to work magically (like the right size for the respective component). This was quite handy (but Ant has other problems). |
Just tried it with addons and this works quite well :-)
But couldn't get it to work with the button example :-( |
Hi @medihack,
This issue is related to display: inline-flex and SVG combination. Please try;
I think you can change your svg code;
|
Added svg support and custom classes for input icon alignment. Exp;
Best Regards, |
Fixed for Button issues. I'll make some changes for Paginator. You can track it at #1839 Best Regards, |
Hi, Ready to create your own Paginator with PrimeReact. 📌 Full Customization and Control Demo: https://youtu.be/4wkP4P6IuuA Best Regards, |
[x ] feature request
Current behavior
icon attribute for PrimeReact components expect css class names only, such as for Menubar or Paginator icons
Expected behavior
To be able to pass React element type, such as FontAwesome React component element, as all modern icon libraries are based on svgs
3.1.7
The text was updated successfully, but these errors were encountered: