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

Support custom wrappers #334

Merged
merged 2 commits into from
Feb 22, 2018
Merged

Conversation

nathanforce
Copy link
Contributor

This feature enables custom elements and components for the container element wrapping the video(s). It accepts either a string or a component.

const CustomWrapper = ({ children, ...props ) => <div {...props}>{children}</div>

<ReactPlayer url={url} as={CustomWrapper} />

@cookpete cookpete merged commit 23c9faf into cookpete:master Feb 22, 2018
@cookpete
Copy link
Owner

Thanks for the PR @nathanforce! I've renamed the prop to wrapper to make it a bit clearer when taken out of context. Nice work 👍

@nathanforce nathanforce deleted the feature/wrapper branch February 22, 2018 14:34
@nathanforce
Copy link
Contributor Author

@cookpete Thanks! Any idea when this will be published?

@cookpete
Copy link
Owner

I'll cut a new minor release once I've cleared up the open issues, which also include some new functionality. Will be later today or tomorrow.

@cookpete
Copy link
Owner

Published in 1.2.0 🎉

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.

None yet

2 participants