@docubook/create 1.12.0 → 1.13.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/dist/.vscode/card.code-snippets +52 -14
- package/src/dist/.vscode/table.code-snippets +10 -18
- package/src/dist/app/page.tsx +2 -2
- package/src/dist/components/context-popover.tsx +133 -0
- package/src/dist/components/docs-menu.tsx +39 -21
- package/src/dist/components/footer.tsx +4 -2
- package/src/dist/components/leftbar.tsx +10 -4
- package/src/dist/components/markdown/CardGroupMdx.tsx +1 -1
- package/src/dist/components/markdown/CardMdx.tsx +5 -4
- package/src/dist/components/markdown/FileTreeMdx.tsx +52 -33
- package/src/dist/components/markdown/KeyboardMdx.tsx +1 -1
- package/src/dist/components/markdown/NoteMdx.tsx +1 -1
- package/src/dist/components/markdown/StepperMdx.tsx +2 -2
- package/src/dist/components/markdown/TooltipsMdx.tsx +6 -3
- package/src/dist/components/navbar.tsx +3 -3
- package/src/dist/components/search.tsx +36 -4
- package/src/dist/components/sublink.tsx +7 -6
- package/src/dist/components/theme-toggle.tsx +10 -10
- package/src/dist/components/toc-observer.tsx +9 -9
- package/src/dist/contents/docs/{getting-started/changelog → changelog/version-1}/index.mdx +45 -3
- package/src/dist/contents/docs/components/accordion/index.mdx +86 -0
- package/src/dist/contents/docs/components/button/index.mdx +40 -0
- package/src/dist/contents/docs/{getting-started/components → components}/card/index.mdx +9 -11
- package/src/dist/contents/docs/{getting-started/components → components}/card-group/index.mdx +2 -4
- package/src/dist/contents/docs/{getting-started/components → components}/code-block/index.mdx +2 -4
- package/src/dist/contents/docs/{getting-started/components → components}/file-tree/index.mdx +3 -3
- package/src/dist/contents/docs/{getting-started/components → components}/index.mdx +1 -1
- package/src/dist/contents/docs/{getting-started/components → components}/keyboard/index.mdx +3 -3
- package/src/dist/contents/docs/{getting-started/components → components}/note/index.mdx +4 -6
- package/src/dist/contents/docs/{getting-started/components → components}/release-note/index.mdx +2 -2
- package/src/dist/contents/docs/{getting-started/components → components}/stepper/index.mdx +2 -4
- package/src/dist/contents/docs/{getting-started/components → components}/tabs/index.mdx +4 -4
- package/src/dist/contents/docs/{getting-started/components → components}/tooltips/index.mdx +1 -1
- package/src/dist/contents/docs/{getting-started/components → components}/youtube/index.mdx +7 -5
- package/src/dist/contents/docs/getting-started/customize/index.mdx +0 -2
- package/src/dist/contents/docs/getting-started/index.mdx +9 -0
- package/src/dist/contents/docs/getting-started/installation/index.mdx +1 -1
- package/src/dist/contents/docs/getting-started/introduction/index.mdx +1 -1
- package/src/dist/contents/docs/getting-started/quick-start-guide/index.mdx +78 -60
- package/src/dist/contents/docs/getting-started/theme-colors/coffee/index.mdx +167 -0
- package/src/dist/contents/docs/getting-started/theme-colors/default/index.mdx +163 -0
- package/src/dist/contents/docs/getting-started/theme-colors/freshlime/index.mdx +164 -0
- package/src/dist/contents/docs/getting-started/theme-colors/index.mdx +9 -0
- package/src/dist/contents/docs/getting-started/theme-colors/llms/index.mdx +66 -0
- package/src/dist/docu.json +56 -23
- package/src/dist/lib/routes-config.ts +8 -1
- package/src/dist/package.json +1 -1
- package/src/dist/styles/globals.css +50 -67
- package/src/dist/styles/syntax.css +24 -29
- package/src/dist/tailwind.config.ts +0 -1
- package/bun.lock +0 -102
- package/src/dist/.vscode/extensions.json +0 -3
- package/src/dist/contents/docs/getting-started/components/accordion/index.mdx +0 -72
- package/src/dist/contents/docs/getting-started/components/button/index.mdx +0 -42
- package/src/dist/styles/editor.css +0 -57
- /package/src/dist/contents/docs/{getting-started/components → components}/custom/index.mdx +0 -0
- /package/src/dist/contents/docs/{getting-started/components → components}/image/index.mdx +0 -0
- /package/src/dist/contents/docs/{getting-started/components → components}/link/index.mdx +0 -0
package/bun.lock
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"lockfileVersion": 1,
|
|
3
|
-
"workspaces": {
|
|
4
|
-
"": {
|
|
5
|
-
"name": "@docubook/create",
|
|
6
|
-
"dependencies": {
|
|
7
|
-
"boxen": "^8.0.1",
|
|
8
|
-
"chalk": "^5.3.0",
|
|
9
|
-
"cli-progress": "^3.12.0",
|
|
10
|
-
"commander": "^12.1.0",
|
|
11
|
-
"enquirer": "^2.4.1",
|
|
12
|
-
"figlet": "^1.8.0",
|
|
13
|
-
"ora": "^8.1.0",
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
"packages": {
|
|
18
|
-
"ansi-align": ["ansi-align@3.0.1", "", { "dependencies": { "string-width": "^4.1.0" } }, "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w=="],
|
|
19
|
-
|
|
20
|
-
"ansi-colors": ["ansi-colors@4.1.3", "", {}, "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw=="],
|
|
21
|
-
|
|
22
|
-
"ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
|
23
|
-
|
|
24
|
-
"ansi-styles": ["ansi-styles@6.2.1", "", {}, "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug=="],
|
|
25
|
-
|
|
26
|
-
"boxen": ["boxen@8.0.1", "", { "dependencies": { "ansi-align": "^3.0.1", "camelcase": "^8.0.0", "chalk": "^5.3.0", "cli-boxes": "^3.0.0", "string-width": "^7.2.0", "type-fest": "^4.21.0", "widest-line": "^5.0.0", "wrap-ansi": "^9.0.0" } }, "sha512-F3PH5k5juxom4xktynS7MoFY+NUWH5LC4CnH11YB8NPew+HLpmBLCybSAEyb2F+4pRXhuhWqFesoQd6DAyc2hw=="],
|
|
27
|
-
|
|
28
|
-
"camelcase": ["camelcase@8.0.0", "", {}, "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA=="],
|
|
29
|
-
|
|
30
|
-
"chalk": ["chalk@5.4.1", "", {}, "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w=="],
|
|
31
|
-
|
|
32
|
-
"cli-boxes": ["cli-boxes@3.0.0", "", {}, "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g=="],
|
|
33
|
-
|
|
34
|
-
"cli-cursor": ["cli-cursor@5.0.0", "", { "dependencies": { "restore-cursor": "^5.0.0" } }, "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw=="],
|
|
35
|
-
|
|
36
|
-
"cli-progress": ["cli-progress@3.12.0", "", { "dependencies": { "string-width": "^4.2.3" } }, "sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A=="],
|
|
37
|
-
|
|
38
|
-
"cli-spinners": ["cli-spinners@2.9.2", "", {}, "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg=="],
|
|
39
|
-
|
|
40
|
-
"commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="],
|
|
41
|
-
|
|
42
|
-
"emoji-regex": ["emoji-regex@10.4.0", "", {}, "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw=="],
|
|
43
|
-
|
|
44
|
-
"enquirer": ["enquirer@2.4.1", "", { "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" } }, "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ=="],
|
|
45
|
-
|
|
46
|
-
"figlet": ["figlet@1.8.1", "", { "bin": { "figlet": "bin/index.js" } }, "sha512-kEC3Sme+YvA8Hkibv0NR1oClGcWia0VB2fC1SlMy027cwe795Xx40Xiv/nw/iFAwQLupymWh+uhAAErn/7hwPg=="],
|
|
47
|
-
|
|
48
|
-
"get-east-asian-width": ["get-east-asian-width@1.3.0", "", {}, "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ=="],
|
|
49
|
-
|
|
50
|
-
"is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
|
|
51
|
-
|
|
52
|
-
"is-interactive": ["is-interactive@2.0.0", "", {}, "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ=="],
|
|
53
|
-
|
|
54
|
-
"is-unicode-supported": ["is-unicode-supported@2.1.0", "", {}, "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ=="],
|
|
55
|
-
|
|
56
|
-
"log-symbols": ["log-symbols@6.0.0", "", { "dependencies": { "chalk": "^5.3.0", "is-unicode-supported": "^1.3.0" } }, "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw=="],
|
|
57
|
-
|
|
58
|
-
"mimic-function": ["mimic-function@5.0.1", "", {}, "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA=="],
|
|
59
|
-
|
|
60
|
-
"onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="],
|
|
61
|
-
|
|
62
|
-
"ora": ["ora@8.2.0", "", { "dependencies": { "chalk": "^5.3.0", "cli-cursor": "^5.0.0", "cli-spinners": "^2.9.2", "is-interactive": "^2.0.0", "is-unicode-supported": "^2.0.0", "log-symbols": "^6.0.0", "stdin-discarder": "^0.2.2", "string-width": "^7.2.0", "strip-ansi": "^7.1.0" } }, "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw=="],
|
|
63
|
-
|
|
64
|
-
"restore-cursor": ["restore-cursor@5.1.0", "", { "dependencies": { "onetime": "^7.0.0", "signal-exit": "^4.1.0" } }, "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA=="],
|
|
65
|
-
|
|
66
|
-
"signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
|
|
67
|
-
|
|
68
|
-
"stdin-discarder": ["stdin-discarder@0.2.2", "", {}, "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ=="],
|
|
69
|
-
|
|
70
|
-
"string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="],
|
|
71
|
-
|
|
72
|
-
"strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
|
73
|
-
|
|
74
|
-
"type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="],
|
|
75
|
-
|
|
76
|
-
"widest-line": ["widest-line@5.0.0", "", { "dependencies": { "string-width": "^7.0.0" } }, "sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA=="],
|
|
77
|
-
|
|
78
|
-
"wrap-ansi": ["wrap-ansi@9.0.0", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q=="],
|
|
79
|
-
|
|
80
|
-
"ansi-align/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
|
|
81
|
-
|
|
82
|
-
"cli-progress/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
|
|
83
|
-
|
|
84
|
-
"log-symbols/is-unicode-supported": ["is-unicode-supported@1.3.0", "", {}, "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ=="],
|
|
85
|
-
|
|
86
|
-
"ora/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
|
|
87
|
-
|
|
88
|
-
"string-width/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
|
|
89
|
-
|
|
90
|
-
"wrap-ansi/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
|
|
91
|
-
|
|
92
|
-
"ansi-align/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
|
|
93
|
-
|
|
94
|
-
"cli-progress/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
|
|
95
|
-
|
|
96
|
-
"ora/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
|
|
97
|
-
|
|
98
|
-
"string-width/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
|
|
99
|
-
|
|
100
|
-
"wrap-ansi/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
|
|
101
|
-
}
|
|
102
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Accordion
|
|
3
|
-
description: A component used to create collapsible content that can be hidden and shown again.
|
|
4
|
-
date: 22-12-2024
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
The Accordion component is a collapsible content container that can be used to hide and show content again. It is a flexible component that can be used to display any content, including HTML elements, markdown components, and plain text.
|
|
8
|
-
|
|
9
|
-
## Preview
|
|
10
|
-
|
|
11
|
-
### Code Block
|
|
12
|
-
|
|
13
|
-
<Accordion title="Code Block" defaultOpen={true}>
|
|
14
|
-
```javascript:main.js showLineNumbers {3-4}
|
|
15
|
-
function isRocketAboutToCrash() {
|
|
16
|
-
// Check if the rocket is stable
|
|
17
|
-
if (!isStable()) {
|
|
18
|
-
NoCrash(); // Prevent the crash
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
```
|
|
22
|
-
</Accordion>
|
|
23
|
-
|
|
24
|
-
### Text with Markdown
|
|
25
|
-
|
|
26
|
-
<Accordion title="Markdown">
|
|
27
|
-
this is an example of plain text content from the accordion component and below is markdown ;
|
|
28
|
-
1. number one
|
|
29
|
-
2. number two
|
|
30
|
-
3. number three
|
|
31
|
-
</Accordion>
|
|
32
|
-
|
|
33
|
-
## Props
|
|
34
|
-
|
|
35
|
-
| Prop | Type | Default | Description |
|
|
36
|
-
| ------------- | --------- | -------------- | -------------------------------------------------------------------------------------- |
|
|
37
|
-
| `title` | `string` | `null` | The value of Accordion title. |
|
|
38
|
-
| `children` | `ReactNode` | `null` | Flexible content, both HTML elements, markdown componenst and plain text. |
|
|
39
|
-
| `defaultOpen` | `boolean` | `false` | You can change the value to `true` if you want the content to open when the page loads |
|
|
40
|
-
|
|
41
|
-
## Code
|
|
42
|
-
|
|
43
|
-
<Tabs defaultValue="markdown" className="pt-5 pb-1">
|
|
44
|
-
<TabsList>
|
|
45
|
-
<TabsTrigger value="markdown">Markdown</TabsTrigger>
|
|
46
|
-
<TabsTrigger value="codeblock">Code Block</TabsTrigger>
|
|
47
|
-
</TabsList>
|
|
48
|
-
<TabsContent value="markdown">
|
|
49
|
-
```plaintext
|
|
50
|
-
<Accordion title="Markdown">
|
|
51
|
-
this is an example of plain text content from the accordion component and below is markdown ;
|
|
52
|
-
1. number one
|
|
53
|
-
2. number two
|
|
54
|
-
3. number three
|
|
55
|
-
</Accordion>
|
|
56
|
-
```
|
|
57
|
-
</TabsContent>
|
|
58
|
-
<TabsContent value="codeblock">
|
|
59
|
-
````plaintext
|
|
60
|
-
<Accordion title="Code Block" defaultOpen={true}>
|
|
61
|
-
```javascript:main.js showLineNumbers {3-4}
|
|
62
|
-
function isRocketAboutToCrash() {
|
|
63
|
-
// Check if the rocket is stable
|
|
64
|
-
if (!isStable()) {
|
|
65
|
-
NoCrash(); // Prevent the crash
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
</Accordion>
|
|
70
|
-
````
|
|
71
|
-
</TabsContent>
|
|
72
|
-
</Tabs>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Button
|
|
3
|
-
description: A component used to create buttons that can be used to trigger actions or navigate to other pages.
|
|
4
|
-
date: 14-12-2024
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
The Button component is a component used to create buttons that can be used to trigger actions or navigate to other pages.
|
|
8
|
-
|
|
9
|
-
## Preview
|
|
10
|
-
|
|
11
|
-
<Button
|
|
12
|
-
text="Learn More"
|
|
13
|
-
href="https://learn.example.com"
|
|
14
|
-
icon="ArrowUpRight"
|
|
15
|
-
size="md"
|
|
16
|
-
target="_blank"
|
|
17
|
-
variation="primary"
|
|
18
|
-
/>
|
|
19
|
-
|
|
20
|
-
## Props
|
|
21
|
-
|
|
22
|
-
| Prop | Type | Default | Description |
|
|
23
|
-
| ----------- | -------- | -------------- | -------------------------------------------- |
|
|
24
|
-
| `text` | `string` | `""` | The value of text button. |
|
|
25
|
-
| `href` | `string` | `""` | The value of url button. |
|
|
26
|
-
| `icon` | `string` | `null` | The value of button icon render from lucide. |
|
|
27
|
-
| `size` | `string` | `"sm, md, lg"` | The value of size button. |
|
|
28
|
-
| `target` | `string` | `"_blank"` | By default target `_blank` |
|
|
29
|
-
| `variation` | `string` | `"primary"` | By default variation is **Primary** |
|
|
30
|
-
|
|
31
|
-
## Code
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
<Button
|
|
35
|
-
text="Learn More"
|
|
36
|
-
href="https://learn.example.com"
|
|
37
|
-
icon="MoveUpRight"
|
|
38
|
-
size="md"
|
|
39
|
-
target="_blank"
|
|
40
|
-
variation="primary"
|
|
41
|
-
/>
|
|
42
|
-
```
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/* GitHub-style editor customizations */
|
|
2
|
-
.editor-container {
|
|
3
|
-
@apply relative font-mono text-sm leading-relaxed;
|
|
4
|
-
height: 100%;
|
|
5
|
-
min-height: 600px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.editor-textarea {
|
|
9
|
-
@apply w-full h-full min-h-[600px] p-4 pl-14 bg-background resize-none focus:outline-none;
|
|
10
|
-
line-height: 1.5rem;
|
|
11
|
-
tab-size: 2;
|
|
12
|
-
counter-reset: line;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/* Line numbers */
|
|
16
|
-
.editor-line-numbers {
|
|
17
|
-
@apply absolute left-0 top-0 bottom-0 w-10 bg-muted/30 border-r select-none;
|
|
18
|
-
padding: 1rem 0;
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.editor-line-numbers-content {
|
|
23
|
-
@apply text-right pr-2 text-muted-foreground/70;
|
|
24
|
-
font-size: 13px;
|
|
25
|
-
line-height: 1.5rem;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.editor-line-numbers-content > div {
|
|
29
|
-
height: 1.5rem;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.editor-line-numbers-content > div::before {
|
|
33
|
-
content: attr(data-line-number);
|
|
34
|
-
display: block;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/* Selection styling */
|
|
38
|
-
.editor-textarea::selection {
|
|
39
|
-
@apply bg-primary/20;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.dark .editor-textarea::selection {
|
|
43
|
-
@apply bg-primary/30;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* Scrollbar styling */
|
|
47
|
-
.editor-textarea::-webkit-scrollbar {
|
|
48
|
-
@apply w-2;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.editor-textarea::-webkit-scrollbar-track {
|
|
52
|
-
@apply bg-transparent;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.editor-textarea::-webkit-scrollbar-thumb {
|
|
56
|
-
@apply bg-muted-foreground/20 rounded-full hover:bg-muted-foreground/30;
|
|
57
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|