welcome-ui
Version:
Customizable design system with react, typescript, tailwindcss and ariakit.
42 lines (41 loc) • 1.26 kB
TypeScript
import { DialogOptions } from '@ariakit/react';
import { ComponentProps, ComponentPropsWithRef } from 'react';
import { IconProps } from '../../Icon';
export interface AssetDrawerOptions extends DialogOptions<'div'> {
/**
* Max width of the drawer
* Number values are converted to pixels
* @example '300px', '50rem', 300
*/
maxWidth?: `${number}px` | `${number}rem` | number;
}
export type AssetDrawerProps = AssetDrawerOptions & ComponentPropsWithRef<'div'>;
export type BackdropProps = Pick<BaseDialogOptions, 'backdrop' | 'hideOnInteractOutside'>;
export type HeaderProps = ComponentProps<'div'> & {
/**
* Show on right a block, for example an HeaderAction
*/
action?: React.ReactNode;
/**
* Icon from Icon component on the gray square
*/
icon?: React.FC<IconProps>;
/**
* Add a back icon on header and call function on click
*/
onBackButtonClick?: (props?: unknown) => void;
/**
* List of tags
*/
subtitle?: React.ReactNode;
/**
* Title of asset
*/
title: React.ReactNode;
};
export type IconBlockProps = {
icon: React.FC<IconProps>;
size?: 'md' | 'sm';
};
type BaseDialogOptions = Omit<DialogOptions<'div'>, 'as'>;
export {};