primevue-mirror/apps/showcase/doc/tooltip/CustomDoc.vue

93 lines
2.3 KiB
Vue
Raw Normal View History

2023-11-02 07:21:31 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>A tooltip sample with a custom style and content.</p>
</DocSectionText>
2024-05-20 12:14:38 +00:00
<div class="card flex flex-wrap justify-center">
2023-11-02 07:21:31 +00:00
<Button
v-tooltip.bottom="{
value: 'PrimeVue Rocks',
pt: {
arrow: {
style: {
2024-03-27 08:30:38 +00:00
borderBottomColor: 'var(--p-primary-color)'
2023-11-02 07:21:31 +00:00
}
},
2024-05-20 12:14:38 +00:00
text: 'bg-primary text-primary-contrast font-medium'
2023-11-02 07:21:31 +00:00
}
}"
severity="secondary"
label="Button"
/>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
<Button
v-tooltip.bottom="{
value: 'PrimeVue Rocks',
pt: {
arrow: {
style: {
2024-03-27 08:30:38 +00:00
borderBottomColor: 'var(--p-primary-color)'
2023-11-02 07:21:31 +00:00
}
},
2024-05-20 12:14:38 +00:00
text: 'bg-primary text-primary-contrast font-medium'
2023-11-02 07:21:31 +00:00
}
}"
label="Button"
/>
`,
options: `
<template>
2024-05-20 12:14:38 +00:00
<div class="card flex flex-wrap justify-center">
2023-11-02 07:21:31 +00:00
<Button
v-tooltip.bottom="{
value: 'PrimeVue Rocks',
pt: {
arrow: {
style: {
2024-03-27 08:30:38 +00:00
borderBottomColor: 'var(--p-primary-color)'
2023-11-02 07:21:31 +00:00
}
},
2024-05-20 12:14:38 +00:00
text: 'bg-primary text-primary-contrast font-medium'
2023-11-02 07:21:31 +00:00
}
}"
severity="secondary"
label="Button"
/>
</div>
</template>
`,
composition: `
<template>
2024-05-20 12:14:38 +00:00
<div class="card flex flex-wrap justify-center">
2023-11-02 07:21:31 +00:00
<Button
v-tooltip.bottom="{
value: 'PrimeVue Rocks',
pt: {
arrow: {
style: {
2024-03-27 08:30:38 +00:00
borderBottomColor: 'var(--p-primary-color)'
2023-11-02 07:21:31 +00:00
}
},
2024-05-20 12:14:38 +00:00
text: 'bg-primary text-primary-contrast font-medium'
2023-11-02 07:21:31 +00:00
}
}"
severity="secondary"
label="Button"
/>
</div>
</template>
`
}
};
}
};
</script>