UNPKG

@nex-ui/react

Version:

🎉 A beautiful, modern, and reliable React component library.

50 lines (47 loc) • 1.31 kB
import { ElementType, ComponentType } from 'react'; import { ClassValue } from 'clsx'; import { Interpolation, CSSObject } from '@nex-ui/system'; import { IconVariants } from '../../theme/recipes/icon.js'; import { OverrideProps } from '../../types/utils.js'; interface IconPropsOverrides { } type IconOwnProps = { /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx?: Interpolation; /** * Additional class names to apply to the root. */ className?: ClassValue; /** * The width of the icon. * @default '1em' */ width?: CSSObject['width']; /** * The height of the icon. * @default '1em' */ height?: CSSObject['height']; /** * The color of the icon. */ color?: CSSObject['color']; /** * The component or element to render as the root. */ as?: ComponentType<any>; /** * Rotate icon with animation. * @default false */ spin?: boolean; /** * The size of the icon. * @default 'md' */ size?: IconVariants['size']; }; type IconProps<RootComponent extends ElementType = 'svg'> = OverrideProps<RootComponent, IconOwnProps, IconPropsOverrides>; export type { IconOwnProps, IconProps, IconPropsOverrides };