Skip to content

Commit c833816

Browse files
committed
👉 Add blog
1 parent 6aab0bf commit c833816

File tree

14 files changed

+464
-0
lines changed

14 files changed

+464
-0
lines changed

components/Button.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from "react";
2+
3+
export default function Button({ text, url }) {
4+
return (
5+
<a
6+
href={url}
7+
style={{ color: "#ffffff", textDecoration: "none" }}
8+
class="mr-2 inline-block rounded-md px-6 py-3 bg-black text-gray-50 text-sm border border-gray-100 dark:border dark:border-gray-100"
9+
>
10+
{text}
11+
</a>
12+
);
13+
}

components/MDXComponents.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import StepCheck from "@/components/StepCheck";
1616
import Divider from "@/components/Divider";
1717
import Table from "@/components/Table";
1818
import VideoDemo from "./VideoDemo";
19+
import VideoComponent from "./VideoComponent";
20+
import Button from "./Button";
1921

2022
const CustomLink = (props) => {
2123
const href = props.href;
@@ -46,6 +48,8 @@ const MDXComponents = {
4648
Divider,
4749
Table,
4850
StepLargeCustom,
51+
VideoComponent,
52+
Button,
4953
};
5054

5155
export default MDXComponents;

components/VideoComponent.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import React from "react";
2+
3+
export default function VideoComponent({ videoUrl }) {
4+
return (
5+
<div
6+
class="max-w-4xl mx-auto"
7+
style={{
8+
overflow: "hidden",
9+
paddingBottom: "56.25%",
10+
position: "relative",
11+
height: "0",
12+
}}
13+
>
14+
<iframe
15+
style={{
16+
position: "absolute",
17+
top: 0,
18+
left: 0,
19+
height: "100%",
20+
width: "100%",
21+
}}
22+
width="520"
23+
height="325"
24+
src={videoUrl}
25+
title="YouTube video player"
26+
frameborder="0"
27+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
28+
allowfullscreen
29+
></iframe>
30+
</div>
31+
);
32+
}

0 commit comments

Comments
 (0)