@cbinsights/fds
Version:
Form: A design system by CB Insights
21 lines (20 loc) • 1.15 kB
TypeScript
import React from 'react';
export interface MenuProps {
/** The open state of the dropdown menu when it is initially rendered. Use when you do not need to control its open state. */
defaultOpen?: boolean;
/** The controlled open state of the dropdown menu. Must be used in conjunction with onOpenChange. */
open?: boolean;
/** Event handler called when the open state of the dropdown menu changes. */
onOpenChange?: (open: boolean) => void;
/** The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers. */
modal?: boolean;
/** Menu content, items and trigger */
children: React.ReactNode;
}
declare const Menu: {
({ children, modal, ...rest }: MenuProps): JSX.Element;
Content: ({ children, ...rest }: import("./MenuContent").MenuContentProps) => JSX.Element;
Item: ({ children, disabled, onSelect, ...rest }: import("./MenuItem").MenuItemProps) => JSX.Element;
Trigger: ({ children, asChild, ...rest }: import("./MenuTrigger").MenuTriggerProps) => JSX.Element;
};
export default Menu;