UNPKG

@kwiz/fluentui

Version:
34 lines (33 loc) 1.88 kB
import { MenuProps } from "@fluentui/react-components"; import React, { PropsWithChildren } from "react"; import { ButtonEXProps } from "../types"; import { iHorizontalProps } from "./horizontal"; import { iMenuExProps } from "./menu"; export declare const kwizOVerflowMoreMenuCSSName = "kfui-overflow-more"; export interface iOverflowV2Props<ItemType> { /** you cannot have a menu with trigger in overflow items. put those in groupWrapper controls before/after rendering children. */ items: ItemType[]; /** when overflow:true, if using the OOB menu, should return a <MenuItem> */ renderItem: (item: ItemType, index: number, overflow?: boolean) => JSX.Element; /** items will only have the items that need to overflow. Add kwizOVerflowMoreMenuCSSName to the button */ renderOverflowMenuButton?: (props: iOverflowV2Props<ItemType>) => JSX.Element; root?: Partial<iHorizontalProps>; nowrap?: boolean; /** if you have this inside a TabList, turn this flag on to make sure tabs don't wrap / shrink text */ nowrapTabs?: boolean; childrenBefore?: JSX.Element; menu?: Partial<MenuProps>; menuIcon?: JSX.Element; /** when hiding items, lower priority items will be collapsed first */ priority?: (item: ItemType, index: number) => number; /** makes this a vertical overflow */ vertical?: boolean; overflowButtonProps?: Partial<ButtonEXProps>; overflowProps?: Partial<iMenuExProps>; /** optional, send in a maxHeight or maxWidth to the root component */ size?: string; /** if you would like to update the priority/overflow when seleciton changes even if size did not change - set this prop */ selection?: unknown; ref?: React.Ref<HTMLDivElement>; } export declare const KWIZOverflowV2: <ItemType>(props: PropsWithChildren<iOverflowV2Props<ItemType>>) => import("react/jsx-runtime").JSX.Element;