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

Portal context class #1244

Merged
merged 6 commits into from
Jun 16, 2017
Merged

Conversation

jrafidi
Copy link
Contributor

@jrafidi jrafidi commented Jun 16, 2017

Checklist

Changes proposed in this pull request:

Add a context property called blueprintPortalClass that all Blueprint Portals respect. This is very beneficial if you are displaying dialogs within a shared component/larger plugin and want to scope your styles. You could go through to every instance of Popover/Dialog/Tooltip and add the class yourself, but you're likely to forget to do it the next time you add something.

Not sure how to update documentation on this one. Also open to suggestions on the context prop name.

Side note: writing the tests for this was confusing/tricky because the tests started with 3 Portals in wherever enzyme puts them. I would have expected to start with an empty space to test. Is there a chance something isn't cleaning up properly?

@palantirtech
Copy link
Member

Thanks for your interest in palantir/blueprint, @jrafidi! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@adidahiya
Copy link
Contributor

adidahiya commented Jun 16, 2017

Let's add something like this to portal.md at the bottom:

@### React context

`Portal` supports the following options on its [React context](https://facebook.github.io/react/docs/context.html).
To use them, supply a child context to a subtree that contains the Portals you want to customize.

@interface IPortalContext

@jrafidi
Copy link
Contributor Author

jrafidi commented Jun 16, 2017

Update docs

Preview: documentation
Coverage: core | datetime

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.

3 participants