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

[Menu] Add Menu child components as static properties of the Menu component #2583

Merged
merged 1 commit into from
Jun 11, 2018
Merged

[Menu] Add Menu child components as static properties of the Menu component #2583

merged 1 commit into from
Jun 11, 2018

Conversation

rosscourt
Copy link
Contributor

Not related to an issue.

Checklist

Changes proposed in this pull request:

Added static properties to the Menu component to allow easier importing of it's child components MenuDivider and MenuItem. Extending an existing pattern found on the NavBar component.

Allow imports such as:

import { ..., Menu, MenuDivider, MenuItem, ... } from '@blueprintjs/core';

to be reduced to:

import { ..., Menu, ... } from '@blueprintjs/core';

Where usage of MenuDivider would be changed to Menu.Divider etc...

I've also aligned the reference to this pattern on the Menu component's documentation page to match the NavBar documentation.

@rosscourt
Copy link
Contributor Author

Add Menu child components as static properties of the Menu component

Preview: documentation | landing | table

Copy link
Contributor

@giladgray giladgray left a comment

Choose a reason for hiding this comment

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

👏 👏 very nice @rosscourt! totally down for this.

@giladgray giladgray merged commit 93a1a9d into palantir:develop Jun 11, 2018
@giladgray
Copy link
Contributor

@rosscourt just so you're aware, this will ship in the next 3.0 beta release later this week.

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