welcome-ui
Version:
Customizable design system with react • styled-components • styled-system and ariakit.
26 lines (25 loc) • 1.32 kB
TypeScript
import { CreateWuiProps, WuiProps } from '../System';
import { ThemeValues } from '../../theme';
import * as Ariakit from '@ariakit/react';
export interface DropdownMenuOptions extends Omit<Ariakit.MenuProps, 'gutter'> {
/** default 4px (space.xs) */
gutter?: keyof ThemeValues['space'] | number;
/** add custom props from styled system on DropdownMenu inner */
innerProps?: WuiProps;
}
export type DropdownMenuProps = CreateWuiProps<'div', DropdownMenuOptions>;
export type UseDropdownMenu = Ariakit.MenuStore;
export type UseDropdownMenuProps = Ariakit.MenuStoreProps;
export type UseDropdownMenuState = Ariakit.MenuStoreState;
type TriggerOptions = {
store: UseDropdownMenu;
};
type TriggerProps = CreateWuiProps<'button', TriggerOptions>;
export declare function useDropdownMenu(options?: UseDropdownMenuProps): UseDropdownMenu;
export declare const DropdownMenu: import('../System').CreateWuiComponent<"div", DropdownMenuProps> & {
Arrow: import('../System').CreateWuiComponent<"div", import('./Arrow').ArrowProps>;
Item: import('../System').CreateWuiComponent<"button", import('./Item').ItemProps>;
Separator: import('../System').CreateWuiComponent<"div", import('./Separator').SeparatorProps>;
Trigger: import('../System').CreateWuiComponent<"button", TriggerProps>;
};
export {};