Skip to content

Commit

Permalink
fix: Update menu dep docs
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel.carrera committed Sep 25, 2023
1 parent 40e295a commit cee0da7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
19 changes: 3 additions & 16 deletions modules/preview-react/menu/lib/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ import {commonColors, space, borderRadius} from '@workday/canvas-kit-react/token
import {hideMouseFocus, GrowthBehavior, generateUniqueId} from '@workday/canvas-kit-react/common';

/**
* ### Deprecated Menu
*
* As of Canvas Kit v8, Menu is being deprecated.
* It will be removed in v10. Please see the
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
* for more information.
* @deprecated ⚠️ `DeprecatedMenuProps` has been deprecated and will be removed in a future major version. Please use [Menu in Main](https://workday.github.io/canvas-kit/?path=/docs/components-popups-menu--basic) instead.
*/
export interface DeprecatedMenuProps
extends GrowthBehavior,
Expand Down Expand Up @@ -55,12 +50,8 @@ export interface DeprecatedMenuProps
}

/**
* ### Deprecated Menu State
*
* As of Canvas Kit v8, Menu is being deprecated.
* It will be removed in v10. Please see the
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
* for more information.
* @deprecated ⚠️ `DeprecatedMenuState` has been deprecated and will be removed in a future major version. Please use [Menu in Main](https://workday.github.io/canvas-kit/?path=/docs/components-popups-menu--basic) instead.
*/
export interface DeprecatedMenuState {
selectedItemIndex: number;
Expand All @@ -78,18 +69,14 @@ const List = styled('ul')({
});

/**
* @deprecated ⚠️ `DeprecatedMenu` has been deprecated. As of Canvas Kit v8, `Menu` is being deprecated.
* It will be removed in v10. Please see the [upgrade
* guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) for
* more information.
*
* `DeprecatedMenu` renders a styled `<ul role="menu">` element within a {@link Card} and follows
* the [Active Menu
* pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/examples/menu-button-actions-active-descendant/)
* using `aria-activedescendant`.
*
* Undocumented props are spread to the underlying `<ul>` element.
*
* @deprecated ⚠️ Deprecated Menu has been deprecated and will be removed in a future major version. Please use [Menu in Main](https://workday.github.io/canvas-kit/?path=/docs/components-popups-menu--basic) instead.
*/
export class DeprecatedMenu extends React.Component<DeprecatedMenuProps, DeprecatedMenuState> {
private id = generateUniqueId();
Expand Down
9 changes: 2 additions & 7 deletions modules/preview-react/menu/lib/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ import {CanvasSystemIcon} from '@workday/design-assets-types';
import {SystemIcon, SystemIconProps} from '@workday/canvas-kit-react/icon';

/**
* ### Deprecated Menu Item Props
*
* As of Canvas Kit v8, Menu is being deprecated.
* It will be removed in v10. Please see the
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
* for more information.
* @deprecated ⚠️ `DeprecatedMenuItemProps` has been deprecated and will be removed in a future major version. Please use [Menu in Main](https://workday.github.io/canvas-kit/?path=/docs/components-popups-menu--basic) instead.
*/
export interface DeprecatedMenuItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
/**
Expand Down Expand Up @@ -264,7 +259,7 @@ const scrollIntoViewIfNeeded = (elem: HTMLElement, centerIfNeeded = true): void
*
* Undocumented props are spread to the underlying `<li>` element.
*
* @deprecated ⚠️ `DeprecatedMenuItem` has been deprecated and will be removed in a future major version. Please see the [Upgrade Guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) for more information.
* @deprecated ⚠️ `DeprecatedMenuItem` has been deprecated and will be removed in a future major version. Please use [Menu in Main](https://workday.github.io/canvas-kit/?path=/docs/components-popups-menu--basic) instead.
*
*/
export class DeprecatedMenuItem extends React.Component<DeprecatedMenuItemProps> {
Expand Down

0 comments on commit cee0da7

Please sign in to comment.