Iconography

Exports

@mbsw/ui에서 가져올 수 있는 항목입니다.

Icon

Props

컴포넌트별 주요 속성입니다. 조건부 속성의 조합과 공통 HTML, Radix 속성은 아래 전체 타입에서 확인하세요.

Icon

Icon 속성
PropType필수 여부
iconIconComponent필수
position"inline-start" | "inline-end"선택
size"lg" | "md" | "sm" | "xl" | "xs" | "3xs" | "2xs" | "2xl" | "3xl" | "4xl"선택
decorativeboolean조건부
labelstring조건부

Type reference

전체 타입 보기

속성 조합과 상속 속성을 포함한 TypeScript 선언입니다.

import { type ElementType, type SVGProps } from 'react';

declare const iconSizes: readonly ["3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl"];

export type IconSize = (typeof iconSizes)[number];

type IconComponent = ElementType<SVGProps<SVGSVGElement>>;

type BaseIconProps = Omit<SVGProps<SVGSVGElement>, 'aria-hidden' | 'aria-label' | 'children' | 'height' | 'role' | 'stroke' | 'strokeWidth' | 'width'> & {
    icon: IconComponent;
    position?: 'inline-start' | 'inline-end';
    size?: IconSize;
};

type DecorativeIconProps = {
    decorative?: true;
    label?: never;
};

type AccessibleIconProps = {
    decorative: false;
    label: string;
};

export type IconProps = BaseIconProps & (DecorativeIconProps | AccessibleIconProps);

export declare function Icon({ decorative, icon: IconComponent, label, position, size, style, ...props }: IconProps): import("react").ReactElement<SVGProps<SVGSVGElement>, string | import("react").JSXElementConstructor<any>>;