@navinc/base-react-components
Version:
Nav's Pattern Library
42 lines (41 loc) • 1.77 kB
TypeScript
import { KebabCase } from 'type-fest';
import { JSX } from 'react';
import * as actions from './actions/index.js';
import * as buildings from './buildings/index.js';
import * as business from './business/index.js';
import * as data from './data/index.js';
import * as feedback from './feedback/index.js';
import * as financing from './financing/index.js';
import * as food from './food/index.js';
import * as logos from './logos/index.js';
import * as medical from './medical/index.js';
import * as others from './others/index.js';
import * as people from './people/index.js';
import * as seasons from './seasons/index.js';
import * as system from './system/index.js';
import * as tech from './tech/index.js';
export declare const iconList: {
actions: typeof actions;
buildings: typeof buildings;
business: typeof business;
data: typeof data;
feedback: typeof feedback;
financing: typeof financing;
food: typeof food;
medical: typeof medical;
others: typeof others;
people: typeof people;
seasons: typeof seasons;
system: typeof system;
tech: typeof tech;
logos: typeof logos;
};
type PathKebab<T> = T extends `${infer A}/${infer B}` ? `${KebabCase<A>}/${KebabCase<B>}` : never;
type TwoLevelDeepKeyOf<ObjectType extends object> = {
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? `${Key}/${keyof ObjectType[Key] & (string | number)}` : never;
}[keyof ObjectType & (string | number)];
export type IconImportName = TwoLevelDeepKeyOf<typeof iconList>;
export type IconName = PathKebab<IconImportName>;
export declare const iconsMap: Record<IconName, (props: JSX.IntrinsicElements["svg"]) => JSX.Element>;
export declare const listOfIcons: IconImportName[];
export default iconList;