Skip to content

Commit

Permalink
docs(styling): Add Grid Sample
Browse files Browse the repository at this point in the history
  • Loading branch information
sfxcode committed Oct 14, 2023
1 parent 56ab7e5 commit 7c25397
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/app/AppTopbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const items = ref([
items: [
{ label: 'Basic', icon: 'pi pi-fw pi-user-edit', to: '/demo/styling' },
{ label: 'Pass Through', icon: 'pi pi-fw pi-user-edit', to: '/demo/passThrough' },
{ label: 'Grid', icon: 'pi pi-fw pi-user-edit', to: '/demo/grid' },
],
},
],
Expand Down
46 changes: 46 additions & 0 deletions src/pages/demo/Grid.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<script setup lang='ts'>
const primeAttributes = 'placeholder'
const customAttributes = 'iconLeft, iconRight'
const schema
= [
{
$el: 'div', // try an h1!
attrs: {
'class': 'flex gap-4',
},
children: [
{
$formkit: 'primeInputText',
name: 'name',
label: 'Col 1',
help: 'Required.',
validation: 'required',
},
{
$formkit: 'primeInputText',
name: 'name2',
label: 'Col 2',
},
],
},
]
const data = { name: 'Name', name2: 'Name 2' }
</script>

<template>
<div class="">
<PrimeInput
header="Grid" :schema="schema" :data="data"
:prime-attributes="primeAttributes" :custom-attributes="customAttributes"
>

</PrimeInput>
</div>
</template>

<style lang='scss' scoped>
</style>
3 changes: 1 addition & 2 deletions src/pages/demo/InputText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ const schema
name: 'name',
label: 'Basic',
help: 'Required.',
validation: 'required',
_readonly: true,
validation: 'required'
},
{
$formkit: 'primeInputText',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/demo/Styling.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const data = { name: 'Some Text in Green', name2: 'Some bold Text in Gray' }
</div>
</template>

<style lang='scss'>
<style lang='scss' scoped>
.p-formkit {
width:60%;
Expand Down

0 comments on commit 7c25397

Please sign in to comment.