-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): configure the formkit to use vuestic inputs
- Loading branch information
1 parent
6fe8861
commit 5201b31
Showing
6 changed files
with
34 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { defaultConfig } from '@formkit/vue' | ||
import * as inputs from '@vuestic/formkit' | ||
|
||
export default defaultConfig({ | ||
inputs, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,6 +185,7 @@ export default defineNuxtConfig({ | |
}, | ||
|
||
formkit: { | ||
defaultConfig: false, | ||
autoImport: true, | ||
}, | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
<FormKit | ||
v-slot="{ state: { valid, loading } }" | ||
v-model="formValue" | ||
:type="types.form" | ||
type="form" | ||
:plugins="[stepPlugin]" | ||
:actions="false" | ||
class="flex flex-col my-4 mx-2" | ||
|
@@ -47,27 +47,27 @@ | |
> | ||
<FormKit | ||
id="contactInfo" | ||
:type="types.group" | ||
type="group" | ||
name="contactInfo" | ||
> | ||
<FormKit | ||
:type="types.text" | ||
type="text" | ||
label="*Full name" | ||
name="full_name" | ||
placeholder="First Last" | ||
validation="required" | ||
/> | ||
|
||
<FormKit | ||
:type="types.email" | ||
type="email" | ||
name="email" | ||
label="*Email address" | ||
placeholder="[email protected]" | ||
validation="required|email" | ||
/> | ||
|
||
<FormKit | ||
:type="types.tel" | ||
type="tel" | ||
name="tel" | ||
label="*Telephone" | ||
mask="+1 (###) ###-####" | ||
|
@@ -88,7 +88,7 @@ | |
> | ||
<div> | ||
<FormKit | ||
:type="types.text" | ||
type="text" | ||
label="*Organization name" | ||
name="org_name" | ||
placeholder="MyOrg, Inc." | ||
|
@@ -98,7 +98,7 @@ | |
</div> | ||
<div> | ||
<FormKit | ||
:type="types.date" | ||
type="date" | ||
label="Date of incorporation" | ||
:validation="date_rule" | ||
name="date_inc" | ||
|
@@ -118,15 +118,15 @@ | |
name="application" | ||
> | ||
<FormKit | ||
:type="types.checkbox" | ||
type="checkbox" | ||
label="*I'm not a previous grant recipient" | ||
help="Have you received a grant from us before?" | ||
name="not_previous_recipient" | ||
validation="required|accepted" | ||
:validation-messages="{ accepted: 'We can only give one grant per organization.' }" | ||
/> | ||
<FormKit | ||
:type="types.textarea" | ||
type="textarea" | ||
label="*How will you use the money?" | ||
name="how_money" | ||
help="Must be between 20 and 500 characters." | ||
|
@@ -140,7 +140,7 @@ | |
<div class="flex justify-between mt-4"> | ||
<div class="flex gap-3"> | ||
<FormKit | ||
:type="types.button" | ||
type="button" | ||
preset="primary" | ||
:disabled="activeStep === 'contactInfo'" | ||
@click="setStep(-1)" | ||
|
@@ -149,7 +149,7 @@ | |
</FormKit> | ||
|
||
<FormKit | ||
:type="types.button" | ||
type="button" | ||
preset="primary" | ||
class="next" | ||
:disabled="activeStep === 'application'" | ||
|
@@ -159,7 +159,7 @@ | |
</FormKit> | ||
</div> | ||
|
||
<FormKit :type="types.submit" :disabled="!valid"> | ||
<FormKit type="submit" :disabled="!valid"> | ||
{{ loading ? 'Submitting...' : 'Submit Application' }} | ||
</FormKit> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters