Type Editor / @type-editor/menu / types/IconSpec / IconSpec
Type Alias: IconSpec
ts
type IconSpec =
| {
height: number;
path: string;
width: number;
}
| {
css?: string;
text: string;
}
| {
dom: Node;
};Defined in: packages/menu/src/types/IconSpec.ts:11
Specifies an icon. May be either an SVG icon, in which case its path property should be an SVG path spec, and width and height should provide the viewbox in which that path exists. Alternatively, it may have a text property specifying a string of text that makes up the icon, with an optional css property giving additional CSS styling for the text. Or it may contain dom property containing a DOM node.