Open titouandk opened 3 weeks ago
I think that the types should rather follow the names given in the Bootstrap Icons doc (without the bi bi-
prefixes we add in the CSS class).
Like arrow-left
, share
, ...
Here is a TS type file created listing the node_modules/bootstrap-icons/icons
directory, using the following command:
ls icons/*.svg | sed 's|.*/||; s|\.svg$||' > icons_list.txt
The output has been post-processed to create the .ts
file.
Prerequisites
Proposal
Will it be possible to create a TypeScript type to enumerate all existing icons?
Like
bi-arrow-left
,bi-three-dots-vertical
, ...Motivation and context
Useful to provide autocompletion on bootstrap icons, or to restrict possible values when passing an icon to a component.