feat(fs.dev): Added syntax highlighting
This commit is contained in:
parent
c5e971e8a7
commit
d1f53b78b6
20 changed files with 535 additions and 35 deletions
31
packages/freesewing.shared/components/mdx/youtube.js
Normal file
31
packages/freesewing.shared/components/mdx/youtube.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
const YouTube = (props) => {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
position: 'relative',
|
||||
paddingBottom: '56.25%' /* 16:9 */,
|
||||
paddingTop: 25,
|
||||
height: 0,
|
||||
}}
|
||||
>
|
||||
<iframe
|
||||
style={{
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
}}
|
||||
src={
|
||||
props.playlist
|
||||
? `https://www.youtube.com/embed/videoseries?list=${props.id}`
|
||||
: `https://www.youtube.com/embed/${props.id}?${props.params || ''}`
|
||||
}
|
||||
frameBorder="0"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default YouTube
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue