primevue-mirror/doc/ripple/DefaultDoc.vue

89 lines
2.2 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
2023-06-13 08:11:06 +00:00
<p>Ripple is enabled by adding add <i>p-ripple</i> class to the target and attach the directive with the v- prefix.</p>
2023-02-28 08:29:30 +00:00
</DocSectionText>
2024-05-20 12:14:38 +00:00
<div class="card flex flex-col items-center gap-4">
2024-05-30 07:55:09 +00:00
<span
>Ripple option at the <span class="mx-1 h-8 w-8 rounded-border inline-flex items-center justify-center bg-primary text-primary-contrast"><i class="pi pi-palette"></i></span> configurator needs to be turned on for the demo.</span
>
2024-05-13 11:17:01 +00:00
<div v-ripple class="ripple-box">Default</div>
2023-02-28 08:29:30 +00:00
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
2024-05-13 11:17:01 +00:00
<div v-ripple class="ripple-box">Default</div>
2023-10-15 09:38:39 +00:00
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2024-05-20 12:14:38 +00:00
<div class="card flex flex-col items-center gap-4">
2024-05-13 11:17:01 +00:00
<div v-ripple class="ripple-box">Default</div>
2023-02-28 08:29:30 +00:00
</div>
</template>
<script>
2023-10-15 09:38:39 +00:00
<\/script>
2024-05-13 11:17:01 +00:00
<style scoped>
.ripple-box {
display: flex;
user-select: none;
justify-content: center;
align-items: center;
padding: 3rem;
font-weight: bold;
background: var(--p-content-background);
border: 1px solid var(--p-content-border-color);
border-radius: var(--p-content-border-radius);
}
<\/style>
2023-10-15 09:38:39 +00:00
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2024-05-20 12:14:38 +00:00
<div class="card flex flex-col items-center gap-4">
2024-05-13 11:17:01 +00:00
<div v-ripple class="ripple-box">Default</div>
2023-02-28 08:29:30 +00:00
</div>
</template>
<script setup>
2023-10-15 09:38:39 +00:00
<\/script>
2024-05-13 11:17:01 +00:00
<style scoped>
.ripple-box {
display: flex;
user-select: none;
justify-content: center;
align-items: center;
padding: 3rem;
font-weight: bold;
background: var(--p-content-background);
border: 1px solid var(--p-content-border-color);
border-radius: var(--p-content-border-radius);
}
<\/style>
2023-10-15 09:38:39 +00:00
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>
2024-05-13 11:17:01 +00:00
<style scoped>
.ripple-box {
display: flex;
user-select: none;
justify-content: center;
align-items: center;
padding: 3rem;
font-weight: bold;
background: var(--p-content-background);
border: 1px solid var(--p-content-border-color);
border-radius: var(--p-content-border-radius);
}
</style>