@teamsparta/stack-chip
Version:
stack chip
43 lines (40 loc) • 1.04 kB
TypeScript
import * as react from 'react';
import { ButtonHTMLAttributes, ReactNode } from 'react';
import { Responsive } from '@teamsparta/stack-core';
import { ChipSize, ChipVariant } from './type.js';
interface ChipProps extends ButtonHTMLAttributes<HTMLButtonElement> {
/**
* 칩의 좌측에 표시할 요소
*/
leftAddon?: ReactNode;
/**
* 칩의 우측에 표시할 요소
*/
rightAddon?: ReactNode;
/**
* 칩 내부에 표시할 텍스트
*/
children?: ReactNode;
/**
* 칩의 크기
* @default "sm"
*/
size?: Responsive<ChipSize>;
/**
* 칩의 스타일 변형
* @default "fill"
*/
variant?: ChipVariant;
/**
* 칩의 선택 상태 여부
* @default false
*/
selected?: boolean;
/**
* 칩의 비활성화 여부
* @default false
*/
disabled?: boolean;
}
declare const Chip: react.ForwardRefExoticComponent<ChipProps & react.RefAttributes<HTMLButtonElement>>;
export { Chip, type ChipProps };