Skip to content

Commit e9df3e5

Browse files
committed
write installation page
1 parent a648a7e commit e9df3e5

1 file changed

Lines changed: 37 additions & 2 deletions

File tree

pages/docs/installation.vue

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,42 @@
1-
<script lang="ts" setup></script>
1+
<script lang="ts" setup>
2+
import { getComponentByName } from "../../utils/registry";
3+
import type { RegistryItem } from "shadcn-vue/registry";
4+
5+
const component: RegistryItem | undefined = getComponentByName("Comp-1");
6+
7+
if (!component) {
8+
throw createError({
9+
statusCode: 404,
10+
message: ` not found`,
11+
});
12+
}
13+
</script>
214

315
<template>
4-
<div>
16+
<div class="w-full md:w-8/12">
517
<Header>Installation</Header>
18+
19+
<div class="mt-5 mb-20 text-justify [&>p]:my-3">
20+
<p>
21+
To install the components, you need to follow the
22+
<a
23+
href="https://www.shadcn-vue.com/docs/installation.html"
24+
class="text-blue-600 underline"
25+
>shadcn/vue installation guide</a
26+
>.
27+
</p>
28+
<p>After that you can install components with CLI.</p>
29+
<div class="max-w-[90vw]">
30+
<ComponentInstallation class="my-7" componentName="Comp-1" />
31+
</div>
32+
<p>Or copy the source code of the component you want.</p>
33+
<div class="max-w-[90vw]">
34+
<ComponentInstallationCode class="my-7" :component="component" />
35+
</div>
36+
<p>
37+
It's best to remember that you can combine the features of different
38+
calendars and create new calendars.
39+
</p>
40+
</div>
641
</div>
742
</template>

0 commit comments

Comments
 (0)