From 247a1f7f2fe8fc7e28887f717c29f70d33e52335 Mon Sep 17 00:00:00 2001 From: Silviu Stan Date: Sat, 13 Apr 2019 21:15:34 +0300 Subject: [PATCH 1/2] pass on proped styles to iframe if existing --- src/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.js b/src/index.js index 30bfaac..edd6395 100644 --- a/src/index.js +++ b/src/index.js @@ -33,6 +33,9 @@ const ratioToPercent = (ratio) => { const ResponsiveEmbed = (props) => { const paddingBottom = ratioToPercent(props.ratio) const style = Object.assign({}, divStyle, {paddingBottom}) + if (props.style) { + iframeStyle = Object.assign(iframeStyle, props.style) + } const iframeProps = Object.assign({frameBorder: 0}, props, {style: iframeStyle}) delete iframeProps.ratio return div({style}, From b6d170e0a77e61597fca0f39bdeb5099aa7e99aa Mon Sep 17 00:00:00 2001 From: Silviu Stan Date: Sun, 14 Apr 2019 13:51:51 +0300 Subject: [PATCH 2/2] fix build --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index edd6395..6766ed3 100644 --- a/src/index.js +++ b/src/index.js @@ -10,7 +10,7 @@ const divStyle = { maxWidth: '100%' } -const iframeStyle = { +let iframeStyle = { position: 'absolute', top: 0, left: 0,