Tooltip PT tab added

pull/4243/head
Tuğçe Küçükoğlu 2023-08-07 16:14:58 +03:00
parent 8e7a7be794
commit 1c5eea697a
5 changed files with 117 additions and 2 deletions

View File

@ -3,7 +3,7 @@
<p>Tooltip can be customized via <i>class</i> and <i>escape</i> properties.</p> <p>Tooltip can be customized via <i>class</i> and <i>escape</i> properties.</p>
</DocSectionText> </DocSectionText>
<div class="card flex flex-wrap justify-content-center gap-2"> <div class="card flex flex-wrap justify-content-center gap-2">
<InputText v-tooltip.right="{ value: `<h4 class='text-white'>PrimeVue Rocks!</h4>`, escape: true, class: 'custom-error' }" type="text" placeholder="Template Tooltip" /> <InputText v-tooltip.right="{ value: `<h4 class='text-white m-0'>PrimeVue Rocks!</h4>`, escape: true, class: 'custom-error' }" type="text" placeholder="Template Tooltip" />
</div> </div>
<DocSectionCode :code="code" /> <DocSectionCode :code="code" />
</template> </template>

64
doc/tooltip/pt/PTDoc.vue Normal file
View File

@ -0,0 +1,64 @@
<template>
<DocSectionText v-bind="$attrs"> </DocSectionText>
<div class="card flex flex-wrap justify-content-center gap-2">
<InputText
v-tooltip.right="{
value: `PrimeVue Rocks!`,
pt: {
text: 'bg-primary'
}
}"
type="text"
placeholder="PassThrough Tooltip"
/>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
<InputText
v-tooltip.right="{
value: \`PrimeVue Rocks!\`,
pt: {
text: 'bg-primary'
}
}"
type="text"
placeholder="PassThrough Tooltip"
/>`,
options: `
<div class="card flex flex-wrap justify-content-center gap-2">
<InputText
v-tooltip.right="{
value: \`PrimeVue Rocks!\`,
pt: {
text: 'bg-primary'
}
}"
type="text"
placeholder="PassThrough Tooltip"
/>
</div>`,
composition: `
<div class="card flex flex-wrap justify-content-center gap-2">
<InputText
v-tooltip.right="{
value: \`PrimeVue Rocks!\`,
pt: {
text: 'bg-primary'
}
}"
type="text"
placeholder="PassThrough Tooltip"
/>
</div>`
}
};
}
};
</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>

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

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

View File

@ -1,5 +1,5 @@
<template> <template>
<DocComponent title="Vue Tooltip Directive" header="Tooltip" description="Tooltip directive provides advisory information for a component." :componentDocs="docs" :apiDocs="['Tooltip']" :themingDocs="themingDoc" /> <DocComponent title="Vue Tooltip Directive" header="Tooltip" description="Tooltip directive provides advisory information for a component." :componentDocs="docs" :apiDocs="['Tooltip']" :ptTabComponent="ptComponent" :themingDocs="themingDoc" />
</template> </template>
<script> <script>
@ -9,6 +9,7 @@ import EventDoc from '@/doc/tooltip/EventDoc';
import ImportDoc from '@/doc/tooltip/ImportDoc'; import ImportDoc from '@/doc/tooltip/ImportDoc';
import PositionDoc from '@/doc/tooltip/PositionDoc'; import PositionDoc from '@/doc/tooltip/PositionDoc';
import TemplateDoc from '@/doc/tooltip/TemplateDoc'; import TemplateDoc from '@/doc/tooltip/TemplateDoc';
import PTComponent from '@/doc/tooltip/pt/index.vue';
import ThemingDoc from '@/doc/tooltip/theming/index.vue'; import ThemingDoc from '@/doc/tooltip/theming/index.vue';
export default { export default {
@ -46,6 +47,7 @@ export default {
component: AccessibilityDoc component: AccessibilityDoc
} }
], ],
ptComponent: PTComponent,
themingDoc: ThemingDoc themingDoc: ThemingDoc
}; };
} }