Extra Icons
The following is the configuration of it
Passing Data through compute.ts
To populate data in this component, you'll need to pass configuration options through compute.ts
. Here’s an example:
- Configure
extraIcons
incompute.ts
.
this is how you will configure in compute.ts
.
{
....
extraIcons: [
`<icon-repository-name>.${<icon-name>}`
// example
`rifi.${IIconRifi.RifiAllCategories}`
......
],
....
}
this is how you will configure in config.json in frontend-server
.
{
....
iconsRepository: {
....
<icon-repository-name>: "<icon-repository-path>",
// example
rifi: "@pubngo-stack/icons/lib/rifi/{iconName}.js"
.......
},
....
}
Key Fields:
- extraIcons: Array of additional icons to map to the categories. Each icon has an associated value that will be passed to the
CategoriesTypeList
component. - iconsRepository: Object mapping icon repositories to their respective paths. Each key represents a repository, and the value is the path template for the icons in that repository.