docs: 📝 Condition block
This commit is contained in:
17
apps/docs/src/js/YoutubeEmbed.jsx
Normal file
17
apps/docs/src/js/YoutubeEmbed.jsx
Normal 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' }}
|
||||
/>
|
||||
)
|
Reference in New Issue
Block a user