Skip to content

Commit a54a956

Browse files
committed
chore: content updates
1 parent a40101b commit a54a956

File tree

7 files changed

+47
-26
lines changed

7 files changed

+47
-26
lines changed

2.essentials/8.schema.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ Notice in the above example that the <code>style</code> attribute is unique in t
7070
Components can be defined with the `$cmp` property. The `$cmp` property should be a string that references a globally defined component or a component passed
7171
into `FormKitSchema` with the `library` prop:
7272

73-
<!-- TODO: determine why schema component is not rendering in example -->
74-
7573
::Example
7674
---
7775
name: "Schema - components"

_examples/checkbox-objects/checkbox-objects.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<script setup>
2-
import { ref, computed } from 'vue'
2+
import { ref } from 'vue'
33
const value = ref([])
4-
const sum = computed(() => {
5-
return new Intl.NumberFormat('en-US')
6-
.format(value.value.reduce((sum, price) => Number(price) + sum, 0))
7-
})
84
</script>
95

106
<template>
@@ -23,7 +19,7 @@ const sum = computed(() => {
2319
value: 'item-55',
2420
label: 'Vada Pav (out of stock)',
2521
help: 'Fried vegetarian dumplings.',
26-
attrs: { disabled: true }
22+
attrs: { disabled: true },
2723
},
2824
{
2925
value: 'item-22',
@@ -34,7 +30,7 @@ const sum = computed(() => {
3430
value: 'item-44',
3531
label: 'Halwa',
3632
help: 'Pudding made with flour.',
37-
}
33+
},
3834
]"
3935
help="Select your favorite Indian dishes."
4036
/>

_examples/dropdown/dropdown-selection-slot.vue

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
<script setup>
2-
const frameworks = [{ label: 'React', value: 'react', asset: 'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/react-logo.png'}, { label: 'Vue', value: 'vue', asset: 'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/vue-logo.png'}, { label: 'Angular', value: 'angular', asset: 'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/angular-logo.png',}, { label: 'Svelte', value: 'svelte', asset: 'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/svelte-logo.png'}]
2+
const frameworks = [
3+
{
4+
label: 'React',
5+
value: 'react',
6+
asset:
7+
'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/react-logo.png',
8+
},
9+
{
10+
label: 'Vue',
11+
value: 'vue',
12+
asset:
13+
'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/vue-logo.png',
14+
},
15+
{
16+
label: 'Angular',
17+
value: 'angular',
18+
asset:
19+
'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/angular-logo.png',
20+
},
21+
{
22+
label: 'Svelte',
23+
value: 'svelte',
24+
asset:
25+
'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/svelte-logo.png',
26+
},
27+
]
328
</script>
429

530
<template>
@@ -13,16 +38,17 @@ const frameworks = [{ label: 'React', value: 'react', asset: 'https://s3.amazona
1338
value="vue"
1439
>
1540
<!--SELECTION SLOT-->
16-
<template #selection="{ option }">
41+
<template #selection="{ option, classes }">
1742
<div class="flex items-center">
1843
<img :src="option.asset" alt="optionAvatar" class="w-5 mr-2" />
19-
<span>
44+
<span :class="classes.selection">
2045
{{ option.label }}
2146
</span>
2247
</div>
2348
</template>
2449
<!---->
2550
</FormKit>
51+
2652
<FormKit
2753
type="dropdown"
2854
name="framework"
@@ -40,11 +66,11 @@ const frameworks = [{ label: 'React', value: 'react', asset: 'https://s3.amazona
4066
<span :class="classes.tagLabel">
4167
{{ option.label }}
4268
</span>
43-
<button
69+
<span
4470
@click.prevent="handlers.removeSelection(option)()"
4571
tabindex="-1"
4672
type="button"
47-
aria-controls="input_1"
73+
role="button"
4874
:class="classes.removeSelection"
4975
>
5076
<span :class="`${classes.closeIcon} ${classes.icon}`"
@@ -59,9 +85,9 @@ const frameworks = [{ label: 'React', value: 'react', asset: 'https://s3.amazona
5985
></path>
6086
</svg>
6187
</span>
62-
</button>
88+
</span>
6389
</div>
6490
</template>
6591
<!--/TAG SLOT-->
6692
</FormKit>
67-
</template>s
93+
</template>

_examples/repeater/repeater-controls.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ import {
3131
</FormKit>
3232
<table>
3333
<thead>
34-
<th>Add</th>
35-
<th>Modify</th>
36-
<th>Remove</th>
34+
<tr>
35+
<th>Add</th>
36+
<th>Modify</th>
37+
<th>Remove</th>
38+
</tr>
3739
</thead>
3840
<tbody>
3941
<tr>

_examples/reset-form/reset-form.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ export default {
1111
// Our api request:
1212
await new Promise((r) => setTimeout(r, 1000))
1313
this.complete = true
14-
this.$formkit.reset('myForm')
14+
this.$formkit.reset('newsletterForm')
1515
},
1616
},
1717
}
1818
</script>
1919

2020
<template>
21-
<FormKit type="form" id="myForm" @submit="handleSubmit">
21+
<FormKit type="form" id="newsletterForm" @submit="handleSubmit">
2222
<h2 class="text-xl font-bold mb-2">Newsletter</h2>
2323
<p class="text-base mb-4">When this form is submitted the form is reset.</p>
2424
<div class="success" v-if="complete">Submitted successfully!</div>

_install/pro-quick-install.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
```js
2-
import { createProPlugin, datepicker, mask } from '@formkit/pro'
2+
import { defineFormKitConfig } from '@formkit/vue'
3+
import { createProPlugin, datepicker } from '@formkit/pro'
34

4-
const proPlugin = createProPlugin('fk-#########', {
5+
const proPlugin = createProPlugin('fk-############', {
56
datepicker,
6-
mask,
77
// any other Pro Inputs
88
})
99

10-
const config = defaultConfig({
10+
export default defineFormKitConfig({
1111
plugins: [proPlugin],
1212
})
1313
```

_install/pro-quick-use.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
```html
22
<FormKit type="datepicker" />
3-
<FormKit type="mask" />
43
```

0 commit comments

Comments
 (0)