UNPKG

@teamsparta/stack-button

Version:
50 lines (47 loc) 1.52 kB
import * as react from 'react'; import { ButtonHTMLAttributes, ReactNode } from 'react'; import { Responsive } from '@teamsparta/stack-core'; import { ButtonVariant, ButtonColorScheme, ButtonSize, ButtonRadius } from './type.js'; interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { /** * 버튼의 스타일을 설정합니다. * @default "solid" */ variant?: ButtonVariant; /** * 버튼의 색상을 설정합니다. * @default "primary" */ colorScheme?: ButtonColorScheme; /** * 버튼의 크기를 설정합니다. * - Responsive 값을 사용하여 반응형 디자인을 적용할 수 있습니다. * @default "md" */ size?: Responsive<ButtonSize>; /** * 버튼의 모서리 모양을 설정합니다. * @default "square" */ radius?: ButtonRadius; /** * 버튼의 로딩 여부를 설정하여 로딩 인디케이터를 보여줍니다. * @default false */ loading?: boolean; /** * 버튼의 왼쪽에 추가되는 요소를 설정합니다. */ leftAddon?: ReactNode; /** * 버튼의 오른쪽에 추가되는 요소를 설정합니다. */ rightAddon?: ReactNode; /** * fullWidth 사용 여부를 설정합니다. * @default false */ fullWidth?: Responsive<boolean>; } declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>; export { Button, type ButtonProps };