2
2
<DocHeader >
3
3
<template #title > Installation </template >
4
4
<template #subtitle > Get started in seconds </template >
5
- <template #notice >
6
- This project is in early development. There still may be significant
7
- changes in the future, so please use with caution. Follow us on
8
- <Anchor
9
- variant =" primary"
10
- classAppend =" space-x-1"
11
- classRemove =" space-x-2"
12
- href =" https://twitter.com/usezephyr"
13
- newTab
14
- >Twitter</Anchor
15
- >
16
- for updates.
5
+ <template #right-side >
6
+ <div :class =" tw`justify-end flex items-start md:mt-2 space-x-2`" >
7
+ <Badge classAppend =" bg-yellow-500 text-gray-900" >In Progress</Badge >
8
+ </div >
17
9
</template >
18
10
</DocHeader >
19
- <div :class =" tw`my-12 space-y-12`" >
11
+ <div :class =" tw`mt-12 mb-24 space-y-12`" >
12
+ <section >
13
+ <h3 :class =" tw`font-medium text(gray-900 dark:gray-100 3xl)`" >
14
+ Requirements
15
+ </h3 >
16
+ <div :class =" tw`border(t gray-200 dark:gray-800) my-4`" ></div >
17
+ <div :class =" tw`space-y-6 mt-6`" >
18
+ <p >
19
+ Vue Zephyr currently supports Vue 3 and higher (as released). There
20
+ are no plans to support Vue 2.
21
+ </p >
22
+ </div >
23
+ </section >
20
24
<section >
21
25
<h3 :class =" tw`font-medium text(gray-900 dark:gray-100 3xl)`" >Install</h3 >
22
26
<div :class =" tw`border(t gray-200 dark:gray-800) my-4`" ></div >
23
- <div :class =" tw`space-y-6`" >
27
+ <div :class =" tw`space-y-6 mt-6 `" >
24
28
<p >
25
29
Inside your project directory root install Vue Zephyr via NPM or Yarn:
26
30
</p >
31
+ <div :class =" tw`space-y-4`" >
32
+ <div :class =" tw`rounded-lg overflow-hidden`" >
33
+ <Code lang =" bash" :code =" codes.npmInstall" inline />
34
+ </div >
35
+ <div :class =" tw`rounded-lg overflow-hidden`" >
36
+ <Code lang =" bash" :code =" codes.yarnInstall" inline />
37
+ </div >
38
+ </div >
39
+ </div >
40
+ </section >
41
+ <section >
42
+ <h3 :class =" tw`font-medium text(gray-900 dark:gray-100 3xl)`" >
43
+ Configure
44
+ </h3 >
45
+ <div :class =" tw`border(t gray-200 dark:gray-800) my-4`" ></div >
46
+ <div :class =" tw`space-y-6 mt-8`" >
47
+ <p >There are two methods of adding Vue Zephyr to your application.</p >
48
+ <p >Use as plugin:</p >
49
+ <div :class =" tw`rounded-lg overflow-hidden`" >
50
+ <Code lang =" js" :code =" codes.configAsPlugin" />
51
+ </div >
52
+ <p >Or import components individually:</p >
53
+ <div :class =" tw`rounded-lg overflow-hidden`" >
54
+ <Code lang =" vue" :code =" codes.configAsComponent" />
55
+ </div >
56
+ <h4 :class =" tw`font-medium text(gray-900 dark:gray-100 xl)`" >
57
+ Plugin Options
58
+ </h4 >
27
59
<div :class =" tw`rounded-lg overflow-hidden`" >
28
- <Code lang =" bash" :code =" codes.npmInstall" />
29
- <Code lang =" bash" :code =" codes.yarnInstall" />
60
+ <Code lang =" js" :code =" codes.pluginConfig" />
30
61
</div >
31
62
</div >
32
63
</section >
33
64
</div >
34
65
</template >
35
66
36
67
<script lang="ts">
68
+ /* eslint-disable no-useless-escape */
37
69
import { defineComponent } from " vue" ;
38
70
import DocHeader from " @/views/components/DocHeader.vue" ;
71
+ import Badge from " @/views/components/Badge.vue" ;
39
72
import Code from " @/views/components/Code.vue" ;
40
73
import { tw } from " twind" ;
41
74
42
75
export default defineComponent ({
43
76
components: {
44
77
DocHeader ,
45
78
Code ,
79
+ Badge ,
46
80
},
47
81
setup() {
48
82
const codes = {
49
83
npmInstall: ` npm i @usezephyr/vue-zephyr ` ,
50
84
yarnInstall: ` yarn add @usezephyr/vue-zephyr ` ,
85
+ configAsPlugin: `
86
+ import { createApp } from "vue";
87
+ import App from "./App.vue";
88
+ import Zephyr from "@usezephyr/vue-zephyr";
89
+
90
+ const app = createApp(App);
91
+
92
+ // \` Zephyr\` is a function that needs to be called here
93
+ app.use(Zephyr(/* Config Options here */));
94
+ app.mount("#app");
95
+ ` ,
96
+ configAsComponent: `
97
+ // Replace \` ExampleComponent\` with whichever component you would like to import
98
+ <template>
99
+ <ExampleComponent />
100
+ </template>
101
+
102
+ <script>
103
+ import { ExampleComponent } from "@usezephyr/vue-zephyr";
104
+ export default {
105
+ components: { ExampleComponent }
106
+ };
107
+ <\/ script>
108
+ ` ,
109
+ pluginConfig: `
110
+ import { createApp } from "vue";
111
+ import App from "./App.vue";
112
+ import Zephyr from "@usezephyr/vue-zephyr";
113
+ import myTheme from "./myTheme.js"
114
+
115
+ const app = createApp(App);
116
+ const ZConfig = {
117
+ theme: myTheme,
118
+ twind: {
119
+ enabled: true, /* Defaults to true */
120
+ setup: { /* Twind configuration */ }
121
+ }
122
+ }
123
+ app.use(Zephyr(ZConfig));
124
+ app.mount("#app");
125
+ ` ,
51
126
};
52
127
return { codes , tw };
53
128
},
54
129
});
55
- </script >
56
-
57
- <style scoped>
58
- </style >
130
+ </script >
0 commit comments