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

[popover2] feat(ContextMenu2): forward more props to wrapper el #4713

Merged
merged 3 commits into from
May 11, 2021

Conversation

adidahiya
Copy link
Contributor

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

  • 🔥 BREAKING CHANGE: the popover props which were supported directly on <ContextMenu2> (overlay lifecycle handlers, popoverClassName, transitionDuration) are now moved to an object in the popoverProps prop.
    • migration: <ContextMenu2 popoverClassName="foo"><ContextMenu2 popoverProps={ popoverClassName: "foo" }}>
  • <ContextMenu2> now forwards extra HTML props down to the generated wrapper element; consumers can mostly treat it like a <div> now

@blueprint-bot
Copy link

use HTMLAttributes like other BP APIs

Previews: documentation | landing | table

/* tslint:disable:object-literal-sort-keys so childNodes can come last */
const INITIAL_STATE: TreeNodeInfo[] = [
{
id: 0,
hasCaret: true,
icon: "folder-close",
label: (
<ContextMenu2 popoverClassName={Popover2Classes.POPOVER2_CONTENT_SIZING} content={<div>Hello there!</div>}>
<ContextMenu2
popoverProps={{ popoverClassName: Popover2Classes.POPOVER2_CONTENT_SIZING }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to DRY this one

@blueprint-bot
Copy link

DRY

Previews: documentation | landing | table

@adidahiya adidahiya changed the title [popover2] feat(ContextMenu2): forward more props to wrapper element [popover2] feat(ContextMenu2): forward more props to wrapper el May 11, 2021
@adidahiya adidahiya merged commit d0a1e3a into develop May 11, 2021
@adidahiya adidahiya deleted the ad/context-menu2-props branch May 11, 2021 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants