FortAwesome / fa-icon-chooser

an icon chooser implemented as a web component
MIT License
15 stars 6 forks source link

Dynamically load available familyStyles #51

Closed mlwilkerson closed 4 months ago

mlwilkerson commented 4 months ago

Removing the hardcoding of familyStyles

Up until now, each time Font Awesome releases a new familyStyle, it's been necessary to change the source code of this component to add the additional familyStyle.

With this PR, the set of available familyStyles for the active version of Font Awesome is retrieved from the GraphQL API.

Changing the UI

The above change also comes with a change of UI. There is no longer a filter button across the top row for each familyStyle to toggle its inclusion in the icon grid. Instead, there are two drop downs: Family and Style. Only the icons corresponding to the selected familyStyle are shown in the icon grid.

Duotone Custom Icons

Duotone custom icons are now working correctly.

Changing QueryHandler and queries

The type signature for QueryHandler has been changed to accept a second optional parameter: variables. This is to allow the use of GraphQL variables in queries.

See also the Changelog.]]