File tree Expand file tree Collapse file tree 8 files changed +45
-25
lines changed
libDocs/composables/useFormik/sections Expand file tree Collapse file tree 8 files changed +45
-25
lines changed Original file line number Diff line number Diff line change
1
+ const Links = {
2
+ Github : "https://github.com/vue-formik/vue-formik" ,
3
+ NPM : "https://www.npmjs.com/package/vue-formik" ,
4
+ Documentation : "https://vue-formik.netlify.app/" ,
5
+ Playground : "https://stackblitz.com/edit/vitejs-vite-px7jzkdy?file=src%2FApp.vue" ,
6
+ Issues : "https://github.com/vue-formik/vue-formik/issues" ,
7
+ PullRequests : "https://github.com/vue-formik/vue-formik/pulls" ,
8
+
9
+ Yup : "https://github.com/jquense/yup" ,
10
+ Joi : "https://joi.dev/" ,
11
+ Zod : "https://zod.dev/" ,
12
+ Formik : "https://formik.org" ,
13
+
14
+ DemoViewGHPage : "https://github.com/vue-formik/docs/blob/main/src/views/DemoView.vue" ,
15
+ KiranLinkedIn : "https://www.linkedin.com/in/kiranparajuli589/" ,
16
+ } ;
17
+
18
+ export default Links ;
Original file line number Diff line number Diff line change
1
+ import Links from "@/constants/Links.ts" ;
2
+
1
3
export default [
2
4
{
3
5
name : "Getting Started" ,
@@ -31,7 +33,7 @@ export default [
31
33
{ name : "Demo" , path : "/demo" } ,
32
34
{
33
35
name : "Playground" ,
34
- path : "https://stackblitz.com/edit/vitejs-vite-px7jzkdy?file=src%2Fcomponents%2FHelloWorld.vue" ,
36
+ path : Links . Playground ,
35
37
} ,
36
38
] ,
37
39
} ,
Original file line number Diff line number Diff line change 45
45
46
46
<script setup lang="ts">
47
47
import pkgJson from " ../../package.json" ;
48
+ import Links from " @/constants/Links.ts" ;
48
49
const { dependencies } = pkgJson ;
49
50
const version = dependencies [" vue-formik" ]?.replace (/ ^ \^ / , " " );
50
51
const links = [
51
52
{
52
53
title: " Github" ,
53
- url: " https://github.com/vue-formik/vue-formik " ,
54
+ url: Links . Github ,
54
55
color: " text-gray-100" ,
55
56
},
56
57
{
57
58
title: " Documentation" ,
58
- url: " https://vue-formik.netlify.app " ,
59
+ url: Links . Documentation ,
59
60
color: " text-green-500" ,
60
61
},
61
62
{
62
63
title: " Playground" ,
63
- url: " https://stackblitz.com/edit/vitejs-vite-px7jzkdy?file=src%2FApp.vue " ,
64
+ url: Links . Playground ,
64
65
color: " text-blue-500" ,
65
66
},
66
67
{
67
68
title: " NPM" ,
68
- url: " https://www.npmjs.com/package/vue-formik " ,
69
+ url: Links . NPM ,
69
70
color: " text-red-500" ,
70
71
},
71
72
{
72
73
title: " Issues" ,
73
- url: " https://github.com/vue-formik/vue-formik/issues " ,
74
+ url: Links . Issues ,
74
75
color: " text-yellow-500" ,
75
76
},
76
77
{
77
78
title: " Pull Requests" ,
78
- url: " https://github.com/vue-formik/vue-formik/pulls " ,
79
+ url: Links . PullRequests ,
79
80
color: " text-purple-500" ,
80
81
},
81
82
];
82
83
const author = {
83
84
name: " Kiran Parajuli" ,
84
85
85
- linkedIn: " https://www.linkedin.com/in/kiranparajuli589/ " ,
86
+ linkedIn: Links . KiranLinkedIn ,
86
87
};
87
88
const birth = " 2024-12-28T18:22:01.000Z" ;
88
89
const fromNow = new Date (birth ).toLocaleString ();
Original file line number Diff line number Diff line change 36
36
<p class =" py-2 text-sm" >
37
37
<span > You can find the source code for this example on </span >
38
38
<a
39
- href =" https://github.com/vue-formik/docs/blob/main/src/views/DemoView.vue "
39
+ : href =" Links.DemoViewGHPage "
40
40
target =" _blank"
41
41
rel =" noopener noreferrer"
42
42
class =" text-blue-500 underline"
@@ -53,6 +53,7 @@ import { onBeforeMount, ref } from "vue";
53
53
import ValidationSchemaPreview from " @/components/home/ValidationSchemaPreview.vue" ;
54
54
import ExpoForm from " @/components/home/ExpoForm.vue" ;
55
55
import { DemoTabs } from " @/constants/demo.ts" ;
56
+ import Links from " @/constants/Links.ts" ;
56
57
57
58
onBeforeMount (() => {
58
59
document .title = " Home | Vue Formik" ;
Original file line number Diff line number Diff line change 13
13
<router-link class =" secondary-btn md" to =" /getting-started/quick-start" >
14
14
Get Started
15
15
</router-link >
16
- <a
17
- class =" secondary-btn md"
18
- target =" _blank"
19
- href =" https://stackblitz.com/edit/vitejs-vite-px7jzkdy?file=src%2FApp.vue"
20
- >
21
- Playground
22
- </a >
16
+ <a class =" secondary-btn md" target =" _blank" :href =" Links.Playground" > Playground </a >
23
17
</div >
24
18
</section >
25
19
46
40
</section >
47
41
</template >
48
42
49
- <script setup lang="ts"></script >
43
+ <script setup lang="ts">
44
+ import Links from " @/constants/Links.js" ;
45
+ </script >
50
46
51
47
<style lang="scss">
52
48
.text-gradient {
Original file line number Diff line number Diff line change 18
18
<p >
19
19
Vue Formik is a powerful library for Vue.js that simplifies form handling by providing a
20
20
more structured approach to managing HTML forms. Inspired by the popular React library
21
- <a href =" https://formik.org " target =" _blank" title =" Formik" >Formik</a >, Vue Formik leverages
21
+ <a : href =" Links.Formik " target =" _blank" title =" Formik" >Formik</a >, Vue Formik leverages
22
22
Vue's built-in reactivity system to streamline form development and management. 💡
23
23
</p >
24
24
</section >
48
48
</li >
49
49
<li >
50
50
You can create custom validation functions or integrate a library like
51
- <a href =" https://github.com/jquense/yup" target =" _blank" title =" Yup" class =" text-primary"
52
- >Yup</a
53
- >, <a href =" https://joi.dev/" target =" _blank" title =" Joi" class =" text-primary" >Joi</a >, or
54
- <a href =" https://zod.dev/" target =" _blank" title =" Zod" class =" text-primary" >Zod</a >
51
+ <a :href =" Links.Yup" target =" _blank" title =" Yup" class =" text-primary" >Yup</a >,
52
+ <a :href =" Links.Joi" target =" _blank" title =" Joi" class =" text-primary" >Joi</a >, or
53
+ <a :href =" Links.Zod" target =" _blank" title =" Zod" class =" text-primary" >Zod</a >
55
54
56
55
for schema-based validation.
57
56
</li >
@@ -72,4 +71,5 @@ import minimalExample from "@/constants/examples/minimalExample";
72
71
import CodeBlock from " @/components/core/CodeBlock.vue" ;
73
72
import InfoIcon from " @/components/svgIcons/InfoIcon.vue" ;
74
73
import InfoPageFooter from " @/components/core/InfoPageFooter.vue" ;
74
+ import Links from " @/constants/Links.ts" ;
75
75
</script >
Original file line number Diff line number Diff line change 11
11
<h4 >✨ Try Vue-Formik Online</h4 >
12
12
<p >
13
13
To quickly try out Vue-Formik, you can use the online
14
- <router-link to = " /playground " >playground</router-link >. It is a code editor that allows
15
- you to write Vue-Formik code and see the results in real-time.
14
+ <a :href = " Links.Playground " target = " _blank " >playground</a >. It is a code editor that
15
+ allows you to write Vue-Formik code and see the results in real-time.
16
16
</p >
17
17
</article >
18
18
</section >
@@ -72,6 +72,7 @@ import CodeBlock from "@/components/core/CodeBlock.vue";
72
72
import minimalExample from " @/constants/examples/minimalExample.ts" ;
73
73
import InfoPageFooter from " @/components/core/InfoPageFooter.vue" ;
74
74
import { ref } from " vue" ;
75
+ import Links from " @/constants/Links.ts" ;
75
76
76
77
const installCommands = {
77
78
npm: ` npm i vue-formik ` ,
Original file line number Diff line number Diff line change 36
36
37
37
<p >
38
38
For more complex validation rules, check out the
39
- <router-link to = " /playground " >Playground</ router-link > section. 🔗
39
+ <a :href = " Links.Playground " target = " _blank " >playground</ a > section. 🔗
40
40
</p >
41
41
</section >
42
42
</template >
@@ -47,4 +47,5 @@ import {
47
47
CustomValidationWithEmailArrayExample ,
48
48
} from " @/constants/examples/validationExamples.ts" ;
49
49
import CodeBlock from " @/components/core/CodeBlock.vue" ;
50
+ import Links from " @/constants/Links.ts" ;
50
51
</script >
You can’t perform that action at this time.
0 commit comments