Function: getIcon()
getIcon<
TCategory,TName>(category:TCategory,name:TName): {actions: {add:IconType;checkNow:IconType;download:IconType;pause:IconType;pauseFilled:IconType;play:IconType;playAll:IconType;playFilled:IconType;refresh:IconType;refreshAlt:IconType;remove:IconType; };layout: {cards:IconType;compact:IconType;grid:IconType;gridAlt:IconType;list:IconType;listAlt:IconType;stacked:IconType;table:IconType;viewColumns:IconType; };metrics: {activity:IconType;incidents:IconType;monitor:IconType;response:IconType;time:IconType;uptime:IconType; };settings: {gear:IconType;gearFilled:IconType; };status: {down:IconType;downFilled:IconType;paused:IconType;pausedFilled:IconType;pending:IconType;pendingFilled:IconType;up:IconType;upAlt:IconType;upFilled:IconType;warning:IconType; };theme: {dark:IconType;light:IconType; };ui: {analytics:IconType;bell:IconType;close:IconType;collapse:IconType;database:IconType;expand:IconType;external:IconType;history:IconType;home:IconType;info:IconType;link:IconType;sidebarCollapse:IconType;sidebarExpand:IconType; }; }[TCategory][TName]
Defined in: src/utils/icons.ts:245
Type-safe icon getter function.
Type Parametersโ
TCategoryโ
TCategory extends "status" | "settings" | "layout" | "theme" | "actions" | "metrics" | "ui"
TNameโ
TName extends string | number | symbol
Parametersโ
categoryโ
TCategory
Icon category.
nameโ
TName
Icon name within category.
Returnsโ
{ actions: { add: IconType; checkNow: IconType; download: IconType; pause: IconType; pauseFilled: IconType; play: IconType; playAll: IconType; playFilled: IconType; refresh: IconType; refreshAlt: IconType; remove: IconType; }; layout: { cards: IconType; compact: IconType; grid: IconType; gridAlt: IconType; list: IconType; listAlt: IconType; stacked: IconType; table: IconType; viewColumns: IconType; }; metrics: { activity: IconType; incidents: IconType; monitor: IconType; response: IconType; time: IconType; uptime: IconType; }; settings: { gear: IconType; gearFilled: IconType; }; status: { down: IconType; downFilled: IconType; paused: IconType; pausedFilled: IconType; pending: IconType; pendingFilled: IconType; up: IconType; upAlt: IconType; upFilled: IconType; warning: IconType; }; theme: { dark: IconType; light: IconType; }; ui: { analytics: IconType; bell: IconType; close: IconType; collapse: IconType; database: IconType; expand: IconType; external: IconType; history: IconType; home: IconType; info: IconType; link: IconType; sidebarCollapse: IconType; sidebarExpand: IconType; }; }[TCategory][TName]
Icon component from react-icons.
Exampleโ
const RefreshIcon = getIcon("actions", "refresh");
<RefreshIcon size={20} />;