UNPKG

@solar-icons/react

Version:
32 lines (31 loc) 1.13 kB
import type { ComponentPropsWithoutRef, RefAttributes } from 'react'; export declare enum IconStyle { BROKEN = "Broken", LINE_DUOTONE = "LineDuotone", LINEAR = "Linear", OUTLINE = "Outline", BOLD = "Bold", BOLD_DUOTONE = "BoldDuotone" } export type IconWeight = 'Broken' | 'LineDuotone' | 'Linear' | 'Outline' | 'Bold' | 'BoldDuotone'; export interface IconBaseProps { alt?: string; color?: string; size?: string | number; weight?: IconWeight; mirrored?: boolean; } export interface IconProps extends ComponentPropsWithoutRef<'svg'>, RefAttributes<SVGSVGElement>, Omit<IconBaseProps, 'color'> { color?: string; } export type Icon = React.ForwardRefExoticComponent<Omit<IconProps, 'ref'> & React.RefAttributes<SVGSVGElement>>; export interface SolarContextType { value: IconBaseProps; setValue: (props: Partial<IconBaseProps>) => void; svgProps?: ComponentPropsWithoutRef<'svg'>; setSvgProps: (props: Partial<ComponentPropsWithoutRef<'svg'>>) => void; } export interface SolarProviderProps { value?: IconBaseProps; svgProps?: ComponentPropsWithoutRef<'svg'>; }