welcome-ui
Version:
Customizable design system with react, typescript, tailwindcss and ariakit.
33 lines (32 loc) • 1.34 kB
TypeScript
import { DialogOptions, DialogProps, DialogStore } from '@ariakit/react';
import { ComponentPropsWithRef } from 'react';
import { CloseButtonProps } from '../CloseButton/types';
import { IconName } from '../Icon/types';
export type { DialogStore as UseDrawer, DialogStoreProps as UseDrawerProps, DialogStoreState as UseDrawerState, } from '@ariakit/react';
export type BackdropOptions = {
hideOnInteractOutside?: boolean;
};
export type BackdropProps = BackdropOptions & ComponentPropsWithRef<'div'>;
export type CloseProps = CloseButtonProps;
export type ContentProps = ComponentPropsWithRef<'div'> & {
iconName?: IconName;
subtitle?: JSX.Element | string;
title?: JSX.Element | string;
};
export interface DrawerOptions extends DialogOptions<'div'> {
fullscreen?: boolean;
placement?: Placement;
size?: Size;
withBackdrop?: boolean;
withCloseButton?: boolean;
}
export type DrawerProps = ComponentPropsWithRef<'div'> & DialogProps<'div'> & DrawerOptions;
export type FooterProps = ComponentPropsWithRef<'div'> & {
variant?: 'full' | 'right';
};
export type TitleProps = ComponentPropsWithRef<'div'>;
export type TriggerProps = ComponentPropsWithRef<'button'> & {
store: DialogStore;
};
type Placement = 'bottom' | 'left' | 'right' | 'top';
type Size = 'auto' | 'sm' | 'md' | 'lg' | string;