2
0

docs: 📝 Condition block

This commit is contained in:
Baptiste Arnaud
2022-04-09 09:47:49 -05:00
parent c5ffd8cb74
commit b1d30fcb3b
9 changed files with 69 additions and 18 deletions

View File

@ -0,0 +1,17 @@
import React from 'react'
export const YoutubeEmbed = ({ videoId }) => (
<iframe
width="100%"
height="500"
src={
videoId.startsWith('https')
? videoId
: `https://www.youtube.com/embed/${videoId}`
}
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
style={{ borderRadius: '0.5rem' }}
/>
)