UNPKG

@uva-glass/component-library

Version:

React components UvA

15 lines (14 loc) 590 B
import { ReactNode, SVGAttributes } from 'react'; import { Icons } from './icons'; type IconName = keyof typeof Icons; export interface IconProps extends Omit<SVGAttributes<SVGElement>, 'height' | 'width'> { /** The name of the icon to render. */ name: IconName; /** The size (in pixels) of the icon to render. */ size?: 16 | 20 | 24 | 32 | 48 | 64 | 96 | 128; /** The title used for a tooltip. */ title?: string; } /** Represents a component to render an icon. */ export declare const Icon: ({ name, size, title, ...restProps }: IconProps) => ReactNode; export {};