Knob pt demo added

pull/3938/head
Tuğçe Küçükoğlu 2023-05-05 17:14:26 +03:00
parent 57cf4b6abb
commit 3902520bba
4 changed files with 124 additions and 3 deletions

69
doc/knob/pt/PTDoc.vue Normal file
View File

@ -0,0 +1,69 @@
<template>
<DocSectionText v-bind="$attrs"></DocSectionText>
<div class="card flex justify-content-center">
<Knob
v-model="value"
:pt="{
value: { style: { stroke: 'var(--cyan-500)' } }
}"
/>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: 0,
code: {
basic: `
<Knob
v-model="value"
:pt="{
value: { style: { stroke: 'var(--cyan-500)' } }
}"
/>`,
options: `
<template>
<div class="card flex justify-content-center">
<Knob
v-model="value"
:pt="{
value: { style: { stroke: 'var(--cyan-500)' } }
}"
/>
</div>
</template>
<script>
export default {
data() {
return {
value: 0
}
}
};
<\/script>`,
composition: `
<template>
<div class="card flex justify-content-center">
<Knob
v-model="value"
:pt="{
value: { style: { stroke: 'var(--cyan-500)' } }
}"
/>
</div>
</template>
<script setup>
import { ref } from 'vue';
const value = ref(0);
<\/script>`
}
};
}
};
</script>

8
doc/knob/pt/PTImage.vue Normal file
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>

41
doc/knob/pt/index.vue Normal file
View File

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

View File

@ -1,5 +1,5 @@
<template> <template>
<DocComponent title="Vue Knob Component" header="Knob" description="Knob is a form component to define number inputs with a dial." :componentDocs="docs" :apiDocs="['Knob']" /> <DocComponent title="Vue Knob Component" header="Knob" description="Knob is a form component to define number inputs with a dial." :componentDocs="docs" :apiDocs="['Knob']" :ptTabComponent="ptComponent" />
</template> </template>
<script> <script>
@ -7,7 +7,6 @@ import AccessibilityDoc from '@/doc/knob/AccessibilityDoc.vue';
import BasicDoc from '@/doc/knob/BasicDoc.vue'; import BasicDoc from '@/doc/knob/BasicDoc.vue';
import ColorDoc from '@/doc/knob/ColorDoc.vue'; import ColorDoc from '@/doc/knob/ColorDoc.vue';
import DisabledDoc from '@/doc/knob/DisabledDoc.vue'; import DisabledDoc from '@/doc/knob/DisabledDoc.vue';
import VeeValidateDoc from '@/doc/knob/form/VeeValidateDoc.vue';
import ImportDoc from '@/doc/knob/ImportDoc.vue'; import ImportDoc from '@/doc/knob/ImportDoc.vue';
import MinMaxDoc from '@/doc/knob/MinMaxDoc.vue'; import MinMaxDoc from '@/doc/knob/MinMaxDoc.vue';
import ReactiveDoc from '@/doc/knob/ReactiveDoc.vue'; import ReactiveDoc from '@/doc/knob/ReactiveDoc.vue';
@ -17,6 +16,9 @@ import StepDoc from '@/doc/knob/StepDoc.vue';
import StrokeDoc from '@/doc/knob/StrokeDoc.vue'; import StrokeDoc from '@/doc/knob/StrokeDoc.vue';
import StyleDoc from '@/doc/knob/StyleDoc.vue'; import StyleDoc from '@/doc/knob/StyleDoc.vue';
import TemplateDoc from '@/doc/knob/TemplateDoc.vue'; import TemplateDoc from '@/doc/knob/TemplateDoc.vue';
import VeeValidateDoc from '@/doc/knob/form/VeeValidateDoc.vue';
import PTComponent from '@/doc/knob/pt/index.vue';
export default { export default {
data() { data() {
return { return {
@ -98,7 +100,8 @@ export default {
label: 'Accessibility', label: 'Accessibility',
component: AccessibilityDoc component: AccessibilityDoc
} }
] ],
ptComponent: PTComponent
}; };
} }
}; };