ColorPicker pt demo added

pull/3938/head
Tuğçe Küçükoğlu 2023-05-05 12:54:18 +03:00
parent 2be89c9d9b
commit be019a10dd
4 changed files with 127 additions and 3 deletions

View File

@ -0,0 +1,73 @@
<template>
<DocSectionText v-bind="$attrs"></DocSectionText>
<div class="card flex justify-content-center">
<ColorPicker
v-model="color"
inline
:pt="{
colorHandler: { class: 'w-1rem h-1rem' }
}"
/>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
color: null,
code: {
basic: `
<ColorPicker
v-model="color"
inline
:pt="{
colorHandler: { class: 'w-1rem h-1rem' }
}"
/>`,
options: `
<template>
<div class="card flex justify-content-center">
<ColorPicker
v-model="color"
inline
:pt="{
colorHandler: { class: 'w-1rem h-1rem' }
}"
/>
</div>
</template>
<script>
export default {
data() {
return {
color: null
};
}
};
<\/script>`,
composition: `
<template>
<div class="card flex justify-content-center">
<ColorPicker
v-model="color"
inline
:pt="{
colorHandler: { class: 'w-1rem h-1rem' }
}"
/>
</div>
</template>
<script setup>
import { ref } from "vue";
const color = ref();
<\/script>`
}
};
}
};
</script>

View File

@ -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>

View File

@ -0,0 +1,41 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>ColorPicker 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.colorpicker',
label: 'ColorPicker PT Options',
component: DocApiTable,
data: getPTOption('ColorPicker')
},
{
id: 'pt.demo',
label: 'Demo',
component: PtDoc
}
]
};
}
};
</script>

View File

@ -1,16 +1,17 @@
<template> <template>
<DocComponent title="Vue ColorPicker Component" header="ColorPicker" description="ColorPicker is an input component to select a color." :componentDocs="docs" :apiDocs="['ColorPicker']" /> <DocComponent title="Vue ColorPicker Component" header="ColorPicker" description="ColorPicker is an input component to select a color." :componentDocs="docs" :apiDocs="['ColorPicker']" :ptTabComponent="ptComponent" />
</template> </template>
<script> <script>
import AccessibilityDoc from '@/doc/colorpicker/AccessibilityDoc'; import AccessibilityDoc from '@/doc/colorpicker/AccessibilityDoc';
import BasicDoc from '@/doc/colorpicker/BasicDoc'; import BasicDoc from '@/doc/colorpicker/BasicDoc';
import DisabledDoc from '@/doc/colorpicker/DisabledDoc'; import DisabledDoc from '@/doc/colorpicker/DisabledDoc';
import VeeValidateDoc from '@/doc/colorpicker/form/VeeValidateDoc';
import FormatDoc from '@/doc/colorpicker/FormatDoc'; import FormatDoc from '@/doc/colorpicker/FormatDoc';
import ImportDoc from '@/doc/colorpicker/ImportDoc'; import ImportDoc from '@/doc/colorpicker/ImportDoc';
import InlineDoc from '@/doc/colorpicker/InlineDoc'; import InlineDoc from '@/doc/colorpicker/InlineDoc';
import StyleDoc from '@/doc/colorpicker/StyleDoc'; import StyleDoc from '@/doc/colorpicker/StyleDoc';
import VeeValidateDoc from '@/doc/colorpicker/form/VeeValidateDoc';
import PTComponent from '@/doc/colorpicker/pt/index.vue';
export default { export default {
data() { data() {
@ -63,7 +64,8 @@ export default {
label: 'Accessibility', label: 'Accessibility',
component: AccessibilityDoc component: AccessibilityDoc
} }
] ],
ptComponent: PTComponent
}; };
} }
}; };