Skip to content

Commit

Permalink
707: Changed GroupedMenuItemList to take a single props parameter tha…
Browse files Browse the repository at this point in the history
…t has includedGroups. Renamed and moved a few types around. Improved/added some comments.
  • Loading branch information
tombogle committed Feb 29, 2024
1 parent c802ebb commit 24365a2
Show file tree
Hide file tree
Showing 15 changed files with 517 additions and 502 deletions.
314 changes: 157 additions & 157 deletions lib/platform-bible-react/dist/index.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/platform-bible-react/dist/index.cjs.map

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions lib/platform-bible-react/dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export type SubMenu = MenuItemInfoBase & {
export interface CommandHandler {
(command: Command): void;
}
export type MenuProps = {
export type MenuPropsBase = {
menuDefinition: SingleColumnMenu;
commandHandler: CommandHandler;
/**
Expand All @@ -290,6 +290,10 @@ export type MenuProps = {
*/
onClick?: () => void;
};
export type MenuItemListProps = MenuPropsBase & {
/** Optional unique (column) identifier */
columnId?: ReferencedItem;
};
export type MenuItemProps = Omit<MenuItemInfo, "command"> & React$1.PropsWithChildren<{
/** Optional unique identifier */
id?: string;
Expand Down Expand Up @@ -364,11 +368,15 @@ export type GridMenuProps = GridMenuInfo & {
className?: string;
};
export function GridMenu({ commandHandler, className, multiColumnMenu, id, }: GridMenuProps): import("react/jsx-runtime").JSX.Element;
export type GroupedMenuItemListProps = MenuProps & {
/**
* All the exported types in this file should be regarded as "internal" (i.e., they should not be
* exposed via index.ts).
*/
export type GroupedMenuPropsBase = MenuPropsBase & {
/** Optional unique (column) identifier */
columnId?: ReferencedItem;
};
export type ContextMenuProps = GroupedMenuItemListProps & {
export type ContextMenuProps = GroupedMenuPropsBase & {
/** Additional css classes to help with styling of the context menu */
className?: string;
};
Expand Down Expand Up @@ -886,10 +894,6 @@ export type ToolbarProps = React$1.PropsWithChildren<{
className?: string;
}>;
export function Toolbar({ menuProvider, commandHandler, className, id, children, }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
export type MenuItemListProps = MenuProps & {
/** Optional unique (column) identifier */
columnId?: ReferencedItem;
};
/**
* This will typically not be useful on its own. It is used to generate and lay out the MenuItems to
* appear on either a GridMenu or a ContextMenu.
Expand Down
Loading

0 comments on commit 24365a2

Please sign in to comment.