Skip to content

Commit 7c25397

Browse files
committed
docs(styling): Add Grid Sample
1 parent 56ab7e5 commit 7c25397

File tree

4 files changed

+49
-3
lines changed

4 files changed

+49
-3
lines changed

src/components/app/AppTopbar.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const items = ref([
6060
items: [
6161
{ label: 'Basic', icon: 'pi pi-fw pi-user-edit', to: '/demo/styling' },
6262
{ label: 'Pass Through', icon: 'pi pi-fw pi-user-edit', to: '/demo/passThrough' },
63+
{ label: 'Grid', icon: 'pi pi-fw pi-user-edit', to: '/demo/grid' },
6364
],
6465
},
6566
],

src/pages/demo/Grid.vue

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<script setup lang='ts'>
2+
const primeAttributes = 'placeholder'
3+
const customAttributes = 'iconLeft, iconRight'
4+
5+
const schema
6+
= [
7+
{
8+
$el: 'div', // try an h1!
9+
attrs: {
10+
'class': 'flex gap-4',
11+
},
12+
children: [
13+
{
14+
$formkit: 'primeInputText',
15+
name: 'name',
16+
label: 'Col 1',
17+
help: 'Required.',
18+
validation: 'required',
19+
},
20+
{
21+
$formkit: 'primeInputText',
22+
name: 'name2',
23+
label: 'Col 2',
24+
25+
},
26+
],
27+
},
28+
]
29+
30+
const data = { name: 'Name', name2: 'Name 2' }
31+
</script>
32+
33+
<template>
34+
<div class="">
35+
<PrimeInput
36+
header="Grid" :schema="schema" :data="data"
37+
:prime-attributes="primeAttributes" :custom-attributes="customAttributes"
38+
>
39+
40+
</PrimeInput>
41+
</div>
42+
</template>
43+
44+
<style lang='scss' scoped>
45+
46+
</style>

src/pages/demo/InputText.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ const schema
99
name: 'name',
1010
label: 'Basic',
1111
help: 'Required.',
12-
validation: 'required',
13-
_readonly: true,
12+
validation: 'required'
1413
},
1514
{
1615
$formkit: 'primeInputText',

src/pages/demo/Styling.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const data = { name: 'Some Text in Green', name2: 'Some bold Text in Gray' }
4444
</div>
4545
</template>
4646

47-
<style lang='scss'>
47+
<style lang='scss' scoped>
4848
4949
.p-formkit {
5050
width:60%;

0 commit comments

Comments
 (0)