Skip to content

Commit 75fbf0b

Browse files
committed
Remove mdx comp
1 parent d1dc5f6 commit 75fbf0b

3 files changed

Lines changed: 21 additions & 34 deletions

File tree

apps/landing/src/app/(detail)/components/MdxCard.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export default async function MdxCard({
1414
src,
1515
demo,
1616
}: {
17-
children: React.ReactNode
1817
src: string
1918
demo: React.ReactNode
2019
}) {

apps/landing/src/app/(detail)/components/button/Examples.mdx

Lines changed: 0 additions & 23 deletions
This file was deleted.

apps/landing/src/app/(detail)/components/button/page.tsx

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { VStack } from '@devup-ui/react'
1+
import { Box, Flex, Text, VStack } from '@devup-ui/react'
22

33
import { CustomCode } from '@/components/mdx/components/CustomCode'
44
import { CustomH4 } from '@/components/mdx/components/CustomH4'
@@ -7,9 +7,14 @@ import { CustomParagraph } from '@/components/mdx/components/CustomParagraph'
77
import { CustomPre } from '@/components/mdx/components/CustomPre'
88
import { CustomStrong } from '@/components/mdx/components/CustomStrong'
99

10+
import MdxCard from '../MdxCard'
1011
import Api from './Api.mdx'
1112
import Button from './Button.mdx'
12-
import Examples from './Examples.mdx'
13+
import { Colors } from './demo/Colors'
14+
import { Danger } from './demo/Danger'
15+
import { Disabled } from './demo/Disabled'
16+
import { Icon } from './demo/Icon'
17+
import { Variants } from './demo/Variants'
1318

1419
export default function Page() {
1520
return (
@@ -24,14 +29,20 @@ export default function Page() {
2429
}}
2530
/>
2631
<VStack gap="16px" py="30px">
27-
<Examples
28-
components={{
29-
h4: CustomH4,
30-
h6: CustomH6,
31-
pre: CustomPre,
32-
p: CustomParagraph,
33-
}}
34-
/>
32+
<Text color="$title" typography="h6">
33+
Examples
34+
</Text>
35+
<Flex flexWrap="wrap" gap="16px">
36+
<Box flex="1" minW="300px" w="calc(50% - 8px)">
37+
<MdxCard demo={<Variants />} src="button/demo/Variants.tsx" />
38+
<MdxCard demo={<Danger />} src="button/demo/Danger.tsx" />
39+
<MdxCard demo={<Disabled />} src="button/demo/Disabled.tsx" />
40+
</Box>
41+
<Box flex="1" minW="300px" w="calc(50% - 8px)">
42+
<MdxCard demo={<Icon />} src="button/demo/Icon.tsx" />
43+
<MdxCard demo={<Colors />} src="button/demo/Colors.tsx" />
44+
</Box>
45+
</Flex>
3546
</VStack>
3647
<VStack gap="16px" py="30px">
3748
<Api

0 commit comments

Comments
 (0)