primevue-mirror/doc/ripple/CustomDoc.vue

76 lines
3.0 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Default styling of the animation adds a shade of white. This can easily be customized using css that changes the color of <i>p-ink</i> element.</p>
</DocSectionText>
2024-04-01 11:14:04 +00:00
<div class="card flex flex-column gap-3 align-items-center">
<span>Ripple option at the <i class="pi pi-palette"></i> configurator needs to be turned on for the demo.</span>
<div class="flex justify-content-center gap-2">
2024-05-13 11:17:01 +00:00
<div v-ripple class="box" style="border: 1px solid rgba(75, 175, 80, 0.3); --p-ripple-background: rgba(75, 175, 80, 0.3)">Green</div>
<div v-ripple class="box" style="border: 1px solid rgba(255, 193, 6, 0.3); --p-ripple-background: rgba(255, 193, 6, 0.3)">Orange</div>
<div v-ripple class="box" style="border: 1px solid rgba(156, 39, 176, 0.3); --p-ripple-background: rgba(156, 39, 176, 0.3)">Purple</div>
2023-10-26 07:41:27 +00:00
</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="box" style="border: 1px solid rgba(75, 175, 80, 0.3); --p-ripple-background: rgba(75, 175, 80, 0.3)">Green</div>
<div v-ripple class="box" style="border: 1px solid rgba(255, 193, 6, 0.3); --p-ripple-background: rgba(255, 193, 6, 0.3)">Orange</div>
<div v-ripple class="box" style="border: 1px solid rgba(156, 39, 176, 0.3); --p-ripple-background: rgba(156, 39, 176, 0.3)">Purple</div>
2023-10-15 09:38:39 +00:00
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-10-26 07:41:27 +00:00
<div class="flex justify-content-center align-items-center gap-2">
2024-05-13 11:17:01 +00:00
<div v-ripple class="box" style="border: 1px solid rgba(75, 175, 80, 0.3); --p-ripple-background: rgba(75, 175, 80, 0.3)">Green</div>
<div v-ripple class="box" style="border: 1px solid rgba(255, 193, 6, 0.3); --p-ripple-background: rgba(255, 193, 6, 0.3)">Orange</div>
<div v-ripple class="box" style="border: 1px solid rgba(156, 39, 176, 0.3); --p-ripple-background: rgba(156, 39, 176, 0.3)">Purple</div>
2023-02-28 08:29:30 +00:00
</div>
</template>
<style scoped>
2023-09-26 12:14:16 +00:00
.box {
padding: 2rem;
border-radius: 10px;
width: 110px;
text-align: center;
}
2023-10-15 09:38:39 +00:00
</style>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-10-26 07:41:27 +00:00
<div class="flex justify-content-center align-items-center gap-2">
2024-05-13 11:17:01 +00:00
<div v-ripple class="box" style="border: 1px solid rgba(75, 175, 80, 0.3); --p-ripple-background: rgba(75, 175, 80, 0.3)">Green</div>
<div v-ripple class="box" style="border: 1px solid rgba(255, 193, 6, 0.3); --p-ripple-background: rgba(255, 193, 6, 0.3)">Orange</div>
<div v-ripple class="box" style="border: 1px solid rgba(156, 39, 176, 0.3); --p-ripple-background: rgba(156, 39, 176, 0.3)">Purple</div>
2023-02-28 08:29:30 +00:00
</div>
</template>
<style scoped>
2023-09-26 12:14:16 +00:00
.box {
padding: 2rem;
border-radius: 10px;
width: 110px;
text-align: center;
}
2023-11-01 14:36:59 +00:00
</style>
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>
<style scoped>
2023-09-26 12:14:16 +00:00
.box {
padding: 2rem;
border-radius: 10px;
width: 110px;
text-align: center;
}
2023-02-28 08:29:30 +00:00
</style>