Checkbox pt demo added
parent
dc3bd44cf2
commit
7db93eb073
|
@ -0,0 +1,81 @@
|
|||
<template>
|
||||
<DocSectionText v-bind="$attrs"></DocSectionText>
|
||||
<div class="card flex justify-content-center">
|
||||
<Checkbox
|
||||
v-model="checked"
|
||||
binary
|
||||
:pt="{
|
||||
input: ({ props, state }) => ({
|
||||
class: state.focused ? 'border-orange-400' : undefined
|
||||
})
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
<DocSectionCode :code="code" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
checked: false,
|
||||
code: {
|
||||
basic: `
|
||||
<Checkbox
|
||||
v-model="checked"
|
||||
binary
|
||||
:pt="{
|
||||
input: ({ props, state }) => ({
|
||||
class: state.focused ? 'border-orange-400' : undefined
|
||||
})
|
||||
}"
|
||||
/>`,
|
||||
options: `
|
||||
<template>
|
||||
<div class="card flex justify-content-center">
|
||||
<Checkbox
|
||||
v-model="checked"
|
||||
binary
|
||||
:pt="{
|
||||
input: ({ props, state }) => ({
|
||||
class: state.focused ? 'border-orange-400' : undefined
|
||||
})
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
checked: false
|
||||
};
|
||||
}
|
||||
};
|
||||
<\/script>`,
|
||||
composition: `
|
||||
<template>
|
||||
<div class="card flex justify-content-center">
|
||||
<Checkbox
|
||||
v-model="checked"
|
||||
binary
|
||||
:pt="{
|
||||
input: ({ props, state }) => ({
|
||||
class: state.focused ? 'border-orange-400' : undefined
|
||||
})
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
const checked = ref(false);
|
||||
<\/script>`
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,8 @@
|
|||
<template>
|
||||
<DocSectionText v-bind="$attrs">
|
||||
<p>{{ $attrs.description }}</p>
|
||||
</DocSectionText>
|
||||
<div class="card">
|
||||
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/wireframe-placeholder.jpg" />
|
||||
</div>
|
||||
</template>
|
|
@ -0,0 +1,41 @@
|
|||
<template>
|
||||
<div class="doc-main">
|
||||
<div class="doc-intro">
|
||||
<h1>Checkbox Pass Through</h1>
|
||||
</div>
|
||||
<DocSections :docs="docs" />
|
||||
</div>
|
||||
<DocSectionNav :docs="docs" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DocApiTable from '@/components/doc/DocApiTable.vue';
|
||||
import { getPTOption } from '@/components/doc/helpers/PTHelper.js';
|
||||
import PtDoc from './PTDoc.vue';
|
||||
import PTImage from './PTImage.vue';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
docs: [
|
||||
{
|
||||
id: 'pt.image',
|
||||
label: 'Wireframe',
|
||||
component: PTImage
|
||||
},
|
||||
{
|
||||
id: 'pt.doc.checkbox',
|
||||
label: 'Checkbox PT Options',
|
||||
component: DocApiTable,
|
||||
data: getPTOption('Checkbox')
|
||||
},
|
||||
{
|
||||
id: 'pt.demo',
|
||||
label: 'Demo',
|
||||
component: PtDoc
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<DocComponent title="Vue Checkbox Component" header="Checkbox" description="Checkbox is an extension to standard checkbox element with theming." :componentDocs="docs" :apiDocs="['Checkbox']" />
|
||||
<DocComponent title="Vue Checkbox Component" header="Checkbox" description="Checkbox is an extension to standard checkbox element with theming." :componentDocs="docs" :apiDocs="['Checkbox']" :ptTabComponent="ptComponent" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -7,11 +7,12 @@ import AccessibilityDoc from '@/doc/checkbox/AccessibilityDoc';
|
|||
import BasicDoc from '@/doc/checkbox/BasicDoc';
|
||||
import DisabledDoc from '@/doc/checkbox/DisabledDoc';
|
||||
import DynamicDoc from '@/doc/checkbox/DynamicDoc';
|
||||
import VeeValidateDoc from '@/doc/checkbox/form/VeeValidateDoc';
|
||||
import GroupDoc from '@/doc/checkbox/GroupDoc';
|
||||
import ImportDoc from '@/doc/checkbox/ImportDoc';
|
||||
import InvalidDoc from '@/doc/checkbox/InvalidDoc';
|
||||
import StyleDoc from '@/doc/checkbox/StyleDoc';
|
||||
import VeeValidateDoc from '@/doc/checkbox/form/VeeValidateDoc';
|
||||
import PTComponent from '@/doc/checkbox/pt/index.vue';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -69,7 +70,8 @@ export default {
|
|||
label: 'Accessibility',
|
||||
component: AccessibilityDoc
|
||||
}
|
||||
]
|
||||
],
|
||||
ptComponent: PTComponent
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue