@teamsparta/stack-custom-modal
Version:
stack custom modal
30 lines (27 loc) • 1.08 kB
TypeScript
import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
import * as Dialog from '@radix-ui/react-dialog';
import { ThemeName } from '@teamsparta/stack-tokens';
import { CustomModalSize } from '../type.js';
interface CustomModalRootProps extends Dialog.DialogProps {
/**
* 모달 외부 클릭 시 모달을 닫을지 여부
* @default true
*/
closeOnInteractOutside?: boolean;
/**
* 모달 크기
* @default "md"
*/
size?: CustomModalSize;
/**
* 테마 이름
*/
theme?: ThemeName;
/**
* 모달 헤더 오른쪽에 닫기 버튼을 숨길지 여부
* @default false
*/
hideCloseButton?: boolean;
}
declare const CustomModalRoot: ({ children, open: openFromProps, onOpenChange: onOpenChangeFromProps, defaultOpen: defaultOpenFromProps, closeOnInteractOutside, size, theme: themeFromProps, hideCloseButton, ...restProps }: CustomModalRootProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
export { CustomModalRoot, type CustomModalRootProps };