Skip to content

Instantly share code, notes, and snippets.

@DopamineDriven
Created August 20, 2020 07:28
Show Gist options
  • Save DopamineDriven/c1280cee9c0f450eb60024844341a717 to your computer and use it in GitHub Desktop.
Save DopamineDriven/c1280cee9c0f450eb60024844341a717 to your computer and use it in GitHub Desktop.
fontawesome-common-types
export type IconPrefix = "fas" | "fab" | "far" | "fal" | "fad";
export type IconPathData = string | string[]
export interface IconLookup {
prefix: IconPrefix;
// IconName is defined in the code that will be generated at build time and bundled with this file.
iconName: IconName;
}
export interface IconDefinition extends IconLookup {
icon: [
number, // width
number, // height
string[], // ligatures
string, // unicode
IconPathData // svgPathData
];
}
export interface IconPack {
[key: string]: IconDefinition;
}
export type IconName = '500px' |
'accessible-icon' |
'accusoft' |
'acquisitions-incorporated' |
// ...7,846 lines later...
'wrench' |
'x-ray' |
'yen-sign' |
'yin-yang';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment