Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(OverflowMenu): use v10 menu and export v11 menu as separate unstable component #10674

Merged
merged 16 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 32 additions & 77 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4519,85 +4519,10 @@ Map {
},
},
"OverflowMenu" => Object {
"$$typeof": Symbol(react.forward_ref),
"render": [Function],
"displayName": "ClassWrapper(OverflowMenu)",
},
"OverflowMenuItem" => Object {
"defaultProps": Object {
"disabled": false,
"hasDivider": false,
"isDelete": false,
"itemText": "Provide itemText",
"onClick": [Function],
"onKeyDown": [Function],
},
"propTypes": Object {
"className": Object {
"type": "string",
},
"closeMenu": Object {
"type": "func",
},
"disabled": Object {
"type": "bool",
},
"handleOverflowMenuItemFocus": Object {
"type": "func",
},
"hasDivider": Object {
"type": "bool",
},
"href": Object {
"type": "string",
},
"index": Object {
"type": "number",
},
"isDelete": Object {
"type": "bool",
},
"itemText": Object {
"isRequired": true,
"type": "node",
},
"onBlur": Object {
"type": "func",
},
"onClick": Object {
"type": "func",
},
"onFocus": Object {
"type": "func",
},
"onKeyDown": Object {
"type": "func",
},
"onKeyUp": Object {
"type": "func",
},
"onMouseDown": Object {
"type": "func",
},
"onMouseEnter": Object {
"type": "func",
},
"onMouseLeave": Object {
"type": "func",
},
"onMouseUp": Object {
"type": "func",
},
"primaryFocus": [Function],
"requireTitle": Object {
"type": "bool",
},
"title": Object {
"type": "string",
},
"wrapperClassName": Object {
"type": "string",
},
},
"displayName": "ClassWrapper(OverflowMenuItem)",
},
"Pagination" => Object {
"defaultProps": Object {
Expand Down Expand Up @@ -8244,6 +8169,36 @@ Map {
},
},
},
"unstable_OverflowMenuV2" => Object {
"propTypes": Object {
"children": Object {
"type": "node",
},
"renderIcon": Object {
"args": Array [
Array [
Object {
"type": "func",
},
Object {
"type": "object",
},
],
],
"type": "oneOfType",
},
"size": Object {
"args": Array [
Array [
"sm",
"md",
"lg",
],
],
"type": "oneOf",
},
},
},
"unstable_PageSelector" => Object {
"defaultProps": Object {
"className": null,
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/__tests__/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ describe('Carbon Components React', () => {
"unstable_MenuItem",
"unstable_MenuRadioGroup",
"unstable_MenuSelectableItem",
"unstable_OverflowMenuV2",
"unstable_PageSelector",
"unstable_Pagination",
"unstable_Popover",
Expand Down
14 changes: 7 additions & 7 deletions packages/react/src/components/ContextMenu/ContextMenu-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ const Story = (items) => {

return (
<StoryFrame>
<InlineNotification
kind="info"
title="Context menu"
subtitle="Right-click anywhere on this page to access an example implementation of this component."
lowContrast
hideCloseButton
/>
<InlineNotification kind="info" lowContrast hideCloseButton>
<strong>Context Menu</strong>
<p>
Right-click anywhere on this page to access an example implementation
of this component.
</p>
</InlineNotification>
<Menu {...menuProps}>{renderedItems}</Menu>
</StoryFrame>
);
Expand Down
Loading