primevue-mirror/pages/tooltip/index.vue

68 lines
2.3 KiB
Vue
Raw Normal View History

2022-09-09 20:41:18 +00:00
<template>
<div>
2022-12-19 11:57:07 +00:00
<Head>
<Title>Vue Tooltip Directive</Title>
<Meta name="description" content="Tooltip functionality is integrated within various PrimeVue components." />
</Head>
2022-09-09 20:41:18 +00:00
<div class="content-section introduction">
<div class="feature-intro">
<h1>Tooltip</h1>
<p>Tooltip directive provides advisory information for a component.</p>
</div>
<AppDemoActions />
</div>
<div class="content-section implementation">
<div class="card">
<h5>Positions</h5>
<div class="grid p-fluid">
<div class="col-12 md:col-3">
2022-12-08 12:26:57 +00:00
<InputText v-tooltip.right="'Enter your username'" type="text" placeholder="Right" />
2022-09-09 20:41:18 +00:00
</div>
<div class="col-12 md:col-3">
2022-12-08 12:26:57 +00:00
<InputText v-tooltip.top="'Enter your username'" type="text" placeholder="Top" />
2022-09-09 20:41:18 +00:00
</div>
<div class="col-12 md:col-3">
2022-12-08 12:26:57 +00:00
<InputText v-tooltip.bottom="'Enter your username'" type="text" placeholder="Bottom" />
2022-09-09 20:41:18 +00:00
</div>
<div class="col-12 md:col-3">
2022-12-08 12:26:57 +00:00
<InputText v-tooltip.left="'Enter your username'" type="text" placeholder="Left" />
2022-09-09 20:41:18 +00:00
</div>
</div>
<h5>Focus and Blur</h5>
2022-12-08 12:26:57 +00:00
<InputText v-tooltip.bottom.focus="'Enter your username'" type="text" placeholder="Focus" />
2022-09-09 20:41:18 +00:00
<h5>Button</h5>
2022-12-08 12:26:57 +00:00
<Button v-tooltip="'Click to proceed'" type="button" label="Save" icon="pi pi-check" />
2022-09-09 20:41:18 +00:00
<h5>Custom Class</h5>
2022-12-08 12:26:57 +00:00
<InputText v-tooltip.right="{ value: 'Invalid username', class: 'custom-error' }" type="text" placeholder="Custom Class" />
2022-09-09 20:41:18 +00:00
</div>
</div>
<TooltipDoc />
</div>
</template>
<script>
import TooltipDoc from './TooltipDoc';
export default {
components: {
TooltipDoc: TooltipDoc
}
};
</script>
<style>
.custom-error .p-tooltip-text {
background-color: var(--pink-800);
color: rgb(255, 255, 255);
}
.custom-error.p-tooltip-right .p-tooltip-arrow {
border-right-color: var(--pink-800);
}
</style>