@@ -3,14 +3,14 @@ import React from 'react'
3
3
import { A , Pre } from '@/components'
4
4
import { CodePen , Gist , Tweet , YouTube , CodeSandbox } from 'mdx-embed'
5
5
6
- function Repl ( { replLink } : { replLink : string } ) {
6
+ function Repl ( { id } : { id : string } ) {
7
7
return (
8
8
< >
9
9
< iframe
10
- title = { `repl-${ replLink } ` }
10
+ title = { `repl-${ id } ` }
11
11
height = "400px"
12
12
width = "100%"
13
- src = { `https://repl.it/${ replLink } ?lite=true` }
13
+ src = { `https://repl.it/${ id } ?lite=true` }
14
14
scrolling = "no"
15
15
frameBorder = "no"
16
16
allowFullScreen = { true }
@@ -20,14 +20,14 @@ function Repl({ replLink }: { replLink: string }) {
20
20
)
21
21
}
22
22
23
- function Glitch ( { glitchId } : { glitchId : string } ) {
23
+ function Glitch ( { id } : { id : string } ) {
24
24
return (
25
25
< div
26
26
className = "glitch-embed-wrap"
27
27
style = { { height : '420px' , width : '100%' } }
28
28
>
29
29
< iframe
30
- src = { `https://glitch.com/embed/#!/embed/${ glitchId } ` }
30
+ src = { `https://glitch.com/embed/#!/embed/${ id } ` }
31
31
title = "probable-stellar-gull on Glitch"
32
32
allow = "geolocation; microphone; camera; midi; vr; encrypted-media"
33
33
style = { { height : '100%' , width : '100%' , border : 0 } }
@@ -56,19 +56,21 @@ export default function Markdown(props: {
56
56
component : Pre ,
57
57
} ,
58
58
CodePen : {
59
- component : CodePen ,
59
+ component : ( { id } : { id : string } ) => < CodePen codePenId = { id } /> ,
60
60
} ,
61
61
Gist : {
62
- component : Gist ,
62
+ component : ( { id } : { id : string } ) => < Gist gistLink = { id } /> ,
63
63
} ,
64
64
Tweet : {
65
- component : Tweet ,
65
+ component : ( { id } : { id : string } ) => < Tweet tweetLink = { id } /> ,
66
66
} ,
67
67
YouTube : {
68
- component : YouTube ,
68
+ component : ( { id } : { id : string } ) => < YouTube youTubeId = { id } /> ,
69
69
} ,
70
70
CodeSandbox : {
71
- component : CodeSandbox ,
71
+ component : ( { id } : { id : string } ) => (
72
+ < CodeSandbox codeSandboxId = { id } />
73
+ ) ,
72
74
} ,
73
75
Repl : {
74
76
component : Repl ,
0 commit comments