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

Inject styles in the opened window? #24

Closed
tleunen opened this issue Aug 30, 2016 · 4 comments
Closed

Inject styles in the opened window? #24

tleunen opened this issue Aug 30, 2016 · 4 comments

Comments

@tleunen
Copy link

tleunen commented Aug 30, 2016

Hey @JakeGinnivan,

First of all, thanks for the component!

Is there a way to inject styles in the opened window? I'd like to style the body for example to remove the default margin it has.

Thanks.

@isthisstackoverflow
Copy link

isthisstackoverflow commented Jan 2, 2017

Same, hence the bump. If you found a way, some directions would be appreciated.

@donnrriz
Copy link

See issue #15

@marchaos
Copy link
Collaborator

marchaos commented Jul 24, 2017

I added a means for getting access to the popout window in my branch. This will probably allow you to inject styles into the document or body.

To get access to the window, use a function for children like so:

<PopoutWindow {...}>
    {popoutWindow => (
            <MyComponent popoutWindow={popoutWindow} />
    )}
</PopoutWindow>

Within your componentWillMount() you could set popout.document.body.style.backgroundColor. etc.

It's a bit if a round about way (not what I added the function behaviour for) but might do for now. I noticed that this project has stagnated since Feb this year. I would be willing to take it over, so could add this functionality via a nicer way if you think it would be useful?

@marchaos
Copy link
Collaborator

Closing as duplicate of #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants