Switch

Exports

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

Switch

Props

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

Switch

Switch 속성
PropType필수 여부
size'md' | 'sm'선택

Type reference

전체 타입 보기

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

import { type ComponentPropsWithoutRef } from 'react';

import { Switch as SwitchPrimitive } from 'radix-ui';

export type SwitchSize = 'md' | 'sm';

type DataAttributes = {
    [key: `data-${string}`]: boolean | number | string | undefined;
};

type SwitchPrimitiveProps = ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>;

export type SwitchProps = Omit<SwitchPrimitiveProps, 'asChild' | 'children' | 'color'> & DataAttributes & {
    size?: SwitchSize;
};

export declare const Switch: import("react").ForwardRefExoticComponent<Omit<Omit<SwitchPrimitive.SwitchProps & import("react").RefAttributes<HTMLButtonElement>, "ref">, "color" | "children" | "asChild"> & DataAttributes & {
    size?: SwitchSize;
} & import("react").RefAttributes<HTMLButtonElement>>;