diff --git a/docs/props.mdx b/docs/props.mdx index 2bf8136..bcf64c7 100644 --- a/docs/props.mdx +++ b/docs/props.mdx @@ -273,6 +273,12 @@ changing these parameters might cause the player to restart or not change at all --- +### `viewContainerStyle` + +A style prop that will be given to the webview container + +--- + ### `webViewStyle` A style prop that will be given to the webview diff --git a/index.d.ts b/index.d.ts index 743c74b..5e00e80 100644 --- a/index.d.ts +++ b/index.d.ts @@ -88,6 +88,10 @@ export interface YoutubeIframeProps { * Sets the volume. Accepts an integer between `0` and `100`. */ volume?: number; + /** + * A style prop that will be given to the webview container + */ + viewContainerStyle?: StyleProp; /** * A style prop that will be given to the webview */ diff --git a/src/YoutubeIframe.js b/src/YoutubeIframe.js index e6e91c2..9a9f139 100644 --- a/src/YoutubeIframe.js +++ b/src/YoutubeIframe.js @@ -33,6 +33,7 @@ const YoutubeIframe = (props, ref) => { play = false, mute = false, volume = 100, + viewContainerStyle, webViewStyle, webViewProps, useLocalHTML, @@ -258,7 +259,7 @@ const YoutubeIframe = (props, ref) => { }, [useLocalHTML, contentScale, baseUrlOverride, allowWebViewZoom]); return ( - +