Skip to content

Commit 3be9aaf

Browse files
authored
add: new blog post (#42)
* add: new blog post
1 parent 8cdc57e commit 3be9aaf

15 files changed

Lines changed: 2171 additions & 2190 deletions

File tree

components/markdown.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use client";
22

33
import {
4+
Blockquote,
45
Callout,
56
Code,
67
ConsCard,
@@ -69,6 +70,7 @@ export const Markdown = ({ code, markdownLocales, slug }: Props) => {
6970
<Preformatted {...props} locales={markdownLocales.codeLocales} />
7071
),
7172
div: Division as React.FC,
73+
blockquote: Blockquote as React.FC,
7274
Tweet: (props: React.ComponentProps<typeof Tweet>) => <Tweet {...props} />,
7375
Callout,
7476
ProsCard,

components/mdx/blockqoute.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export const Blockquote: React.FC<React.HTMLAttributes<HTMLQuoteElement>> = (
2+
props,
3+
) => {
4+
return (
5+
<blockquote className="my-8 border-l-4 border-gray-300 pl-4" {...props} />
6+
);
7+
};

components/mdx/index.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Blockquote } from "./blockqoute";
12
import { Callout } from "./callout";
23
import { Code } from "./code";
34
import { ConsCard } from "./cons-card";
@@ -14,18 +15,19 @@ import { TextLink } from "./text-link";
1415
import { Tweet } from "./tweet";
1516

1617
export {
17-
ProsCard,
18+
Blockquote,
19+
Callout,
20+
Code,
1821
ConsCard,
19-
Paragraph,
20-
Tweet,
22+
Division,
2123
Heading,
2224
List,
2325
ListItem,
26+
Mafs,
2427
MarkdownImage,
25-
TextLink,
26-
Code,
28+
Paragraph,
2729
Preformatted,
28-
Division,
29-
Callout,
30-
Mafs,
30+
ProsCard,
31+
TextLink,
32+
Tweet,
3133
};

components/mdx/list-item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const ListItem: React.FC<ListItemProps> = ({ children, ...props }) => {
2222
<li ref={listRef} className="flex flex-row items-baseline" {...rest}>
2323
{type === "ul" && (
2424
<span
25-
className="min-w-20 translate-y-1 transform text-secondary pr-3"
25+
className="translate-y-1 transform text-secondary pr-2"
2626
aria-hidden
2727
>
2828
<ArrowRight width={18} height={18} />

0 commit comments

Comments
 (0)