Using primereact icons in custom extensions

Hi, I am trying to create a rather simple table view of linked records with some editing capabilities. As far as I managed to discover, the grid element is not available in the SDK, so am using using the Primereact library.

It is going pretty well overall, expect that I cannot get primeicons to be displayed. All I get is a square instead of the actual icon (similar to what is described here)

I am fairly new to React and frontend development, so perhaps my question will not make sense to everyone and I am not sure this is even supported, but I’ve seen that some people are using primereact with Airtable SDK, so I am thinking there must be a way to display these icons?

1 Like

I use the same library and was never able to get the icons to work. Curious to see if a solution is now possible due to the Blocks API permitting webpack config.

My interim solution was just to use CSS to replace all icons with SVG matching Airtable’s styling. Its just as annoying as it sounds.

Ok, good to know it’s not just me then :slight_smile: Thanks for your suggestion, I was able to do what you suggest for regular buttons and stuff, but I am struggling with the default icons in other elements, like X in Dialog here:

Were you perhaps able to replace these as well? The same goes for the previous/next month icons in the calendar.

I haven’t needed either of the specific examples you listed. I mostly use PrimeReact for dropdowns/multi-selects. The icons for those are easy to replace because they have CSS classes applied to them.

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.