Skip to content

Commit 2f84392

Browse files
author
Ben Grynhaus
committed
[Fabric][CommandBar] Changed API for 'renderIcon'
1 parent 91a380a commit 2f84392

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/fabric/src/components/command-bar/command-bar.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ export class FabCommandBarComponent extends ReactWrapperComponent<ICommandBarPro
9393
return Object.assign(
9494
{},
9595
sharedProperties,
96-
iconRenderer && { onRenderIcon: (props) => iconRenderer(props) } as Pick<ICommandBarItemProps, 'onRenderIcon'>,
96+
iconRenderer && { onRenderIcon: (props) => iconRenderer({ contextualMenuItemProps: props }) } as Pick<ICommandBarItemProps, 'onRenderIcon'>,
9797
renderer && { onRender: (item, dismissMenu) => renderer({ item, dismissMenu }) } as Pick<ICommandBarItemProps, 'onRender'>,
9898
) as ICommandBarItemProps;
9999
}
100100
}
101101

102102
export interface ICommandBarItemOptions<TData = any> extends Pick<ICommandBarItemProps, 'iconOnly' | 'buttonStyles' | 'cacheKey' | 'renderedInOverflow' | 'componentRef' | 'key' | 'text' | 'secondaryText' | 'iconProps' | 'submenuIconProps' | 'disabled' | 'primaryDisabled' | 'shortCut' | 'canCheck' | 'checked' | 'split' | 'data' | 'onClick' | 'href' | 'target' | 'rel' | 'subMenuProps' | 'getItemClassNames' | 'getSplitButtonVerticalDividerClassNames' | 'sectionProps' | 'className' | 'style' | 'ariaLabel' | 'title' | 'onMouseDown' | 'role' | 'customOnRenderListLength' | 'keytipProps' | 'inactive'> {
103103
readonly [propertyName: string]: any;
104-
readonly renderIcon?: InputRendererOptions<IContextualMenuItemProps>;
104+
readonly renderIcon?: InputRendererOptions<{ contextualMenuItemProps: IContextualMenuItemProps }>;
105105
readonly render?: InputRendererOptions<{ item: any, dismissMenu: (ev?: any, dismissAll?: boolean) => void }>;
106106
readonly data?: TData;
107107
}

0 commit comments

Comments
 (0)