Skip to content

Commit

Permalink
Added exports for ContextualMenu getItemStyles and getItemClassNames …
Browse files Browse the repository at this point in the history
…to v8 (#24484)

* Added exports for ContextualMenu getItemStyles and getItemClassNames

* yarn change

* Fixed param comment

* Update API.md
  • Loading branch information
GeoffCoxMSFT authored Aug 23, 2022
1 parent f310400 commit 23a0768
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Added exports for ContextualMenu getItemStyles and getItemClassNames",
"packageName": "@fluentui/react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
8 changes: 8 additions & 0 deletions packages/react/etc/react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1731,6 +1731,14 @@ export const getCommandBarStyles: (props: ICommandBarStyleProps) => ICommandBarS
// @public (undocumented)
export const getCommandButtonStyles: (customStyles: IButtonStyles | undefined) => IButtonStyles;

// Warning: (ae-internal-missing-underscore) The name "getContextualMenuItemClassNames" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal @deprecated (undocumented)
export const getContextualMenuItemClassNames: (theme: ITheme, disabled: boolean, expanded: boolean, checked: boolean, isAnchorLink: boolean, knownIcon: boolean, itemClassName?: string | undefined, dividerClassName?: string | undefined, iconClassName?: string | undefined, subMenuClassName?: string | undefined, primaryDisabled?: boolean | undefined, className?: string | undefined) => IContextualMenuItemStyles;

// @public
export const getContextualMenuItemStyles: (props: IContextualMenuItemStyleProps) => IContextualMenuItemStyles;

// @public (undocumented)
export function getContrastRatio(color1: IColor, color2: IColor): number;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export const getItemClassNames = memoizeFunction(
* the getStyles API, but invokes memoized className generator function with
* primitive values.
*
* @param props the ContextualMenuItem style props used to generate its styles.
* @param props - the ContextualMenuItem style props used to generate its styles.
*/
export const getItemStyles = (props: IContextualMenuItemStyleProps): IContextualMenuItemStyles => {
const {
Expand Down
5 changes: 5 additions & 0 deletions packages/react/src/components/ContextualMenu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ export * from './ContextualMenuItem';
export * from './ContextualMenuItem.base';
export * from './ContextualMenuItem.types';
export { getMenuItemStyles } from './ContextualMenu.cnstyles';
export {
// eslint-disable-next-line deprecation/deprecation
getItemClassNames as getContextualMenuItemClassNames,
getItemStyles as getContextualMenuItemStyles,
} from './ContextualMenu.classNames';
// eslint-disable-next-line deprecation/deprecation
export type { IContextualMenuClassNames, IMenuItemClassNames } from './ContextualMenu.classNames';

0 comments on commit 23a0768

Please sign in to comment.