UNPKG

@reusable-ui/icon

Version:

An icon set component for React app.

20 lines (19 loc) 1.48 kB
import { default as React } from 'react'; import { ResizableProps, ThemeableProps, MildableProps } from '@reusable-ui/core'; import { GenericProps } from '@reusable-ui/generic'; import type { SizeName } from './variants/resizable.js'; import type { default as builtinIconList } from './icon-font-material.js'; export declare const useIconStyleSheet: () => import("@cssfn/css-types").CssScopeMap<"main">; export { builtinIconList }; export type BuiltinIconList = (typeof builtinIconList)[number]; export declare const customIconList: readonly ["instagram", "whatsapp", "google", "twitter", "apple", "close", "busy", "navup", "navdown", "navleft", "navright", "dropup", "dropdown", "dropleft", "dropright"]; export type CustomIconList = (typeof customIconList)[number] | (string & {}); export type IconList = BuiltinIconList | CustomIconList; export interface IconProps<TElement extends Element = HTMLSpanElement> extends Omit<GenericProps<TElement>, 'children'>, Omit<React.HTMLAttributes<TElement>, 'role' | 'children'>, ResizableProps<SizeName>, ThemeableProps, MildableProps { icon: IconList; } declare const Icon: <TElement extends Element = HTMLSpanElement>(props: IconProps<TElement>) => JSX.Element | null; export { Icon, Icon as default, }; export interface IconComponentProps<TElement extends Element = HTMLSpanElement> extends Partial<Pick<IconProps<TElement>, 'icon'>> { iconComponent?: React.ReactComponentElement<any, IconProps<TElement>>; }