primefaces / primefaces/primereact

Question: Is "i" tag supported as Custom Icon?

Open
#6,262 9 comments 0 reactions 1 assignee View on GitHub

@vicabhu is already working on this.

Since Apr 4, 2024.

Component: Documentation
Dominant language
CSS
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Hi there.

I have seen that you can actually define a custom icon with the following syntax:

<Button icon={() => <i className="pi pi-times" />}/>

See the forked example:
https://stackblitz.com/edit/awdxtv-ltawe4?file=src%2FApp.jsx

However, that syntax is actually not listed in the Custom Icons page.

Is this syntax actually supported?

If so:

  • I guess the {...options.iconProps} (props injections) is actually not needed (it was not working with them)?

  • Would it make sense to update the documentation to include that syntax?

Thanks in advance!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.