UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

72 lines 2.43 kB
import * as React from 'react'; import { CSProps } from '@workday/canvas-kit-styling'; import { FlexProps } from '@workday/canvas-kit-react/layout'; export interface MenuGroupHeaderProps extends CSProps, FlexProps { /** * The label text of the {@link MenuGroup Menu.Group}. */ children?: React.ReactNode; } export interface MenuGroupProps extends CSProps, FlexProps { /** * The children of the `Menu.Group`. Should be {@link MenuGroupHeading Menu.Group.Heading} or * {@link MenuItem Menu.Item}. If the `title` prop is provided, the `Menu.Group.Heading` is not * needed. */ children?: React.ReactNode; /** * Optional `Menu.Group` title. If a `title` is provided, a `Menu.Group.Heading` will be inserted * with this prop being the `children`. If you wish more control over the styling of the * `Menu.Group` heading, use the `<Menu.Group.Heading>` component directly and you'll have access * to styling: * * ```tsx * // default * <Menu.Group title="Group One"> * <Menu.Item>Item One</Menu.Item> * </Menu.Group> * * // direct access to the heading * <Menu.Group> * <Menu.Group.Heading cs={...}>Group One</Menu.Group.Heading> * <Menu.Item>Item One</Menu.Item> * </Menu.Group> * ``` */ title?: string; } export declare const menuGroupHeadingStencil: import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, {}, never>, {}, {}, never, never>; export declare const useMenuGroup: import("@workday/canvas-kit-react/common").BehaviorHook<{ state: { id: string; }; events: {}; }, { readonly 'data-type': "group"; readonly role: "group"; readonly 'aria-labelledby': string; }>; export declare const useMenuGroupHeading: import("@workday/canvas-kit-react/common").BehaviorHook<{ state: { id: string; }; events: {}; }, { readonly id: string; }>; export declare const MenuGroup: import("@workday/canvas-kit-react/common").ElementComponentM<"div", MenuGroupProps & Partial<{ id: string | undefined; }> & {} & {}, { state: { id: string; }; events: {}; }> & { Heading: import("@workday/canvas-kit-react/common").ElementComponentM<"div", {}, { state: { id: string; }; events: {}; }>; }; //# sourceMappingURL=MenuGroup.d.ts.map