primevue-mirror/doc/ripple/CustomDoc.vue

196 lines
4.5 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>
<div class="card flex justify-content-center align-items-center gap-2">
2023-10-26 07:41:27 +00:00
<div
v-ripple="{
pt: {
root: { style: 'background: rgba(75, 175, 80, 0.3)' }
}
}"
2024-01-24 10:57:05 +00:00
class="p-ripple box"
2024-01-26 10:32:22 +00:00
style="border: 1px solid rgba(75, 175, 80, 0.3)"
2023-10-26 07:41:27 +00:00
>
Green
</div>
<div
v-ripple="{
pt: {
root: { style: 'background: rgba(255, 193, 6, 0.3)' }
}
}"
2024-01-24 10:57:05 +00:00
class="p-ripple box"
2024-01-26 10:32:22 +00:00
style="border: 1px solid rgba(255, 193, 6, 0.3)"
2023-10-26 07:41:27 +00:00
>
Orange
</div>
<div
v-ripple="{
pt: {
root: { style: 'background: rgba(156, 39, 176, 0.3)' }
}
}"
2024-01-24 10:57:05 +00:00
class="p-ripple box"
2024-01-26 10:32:22 +00:00
style="border: 1px solid rgba(156, 39, 176, 0.3)"
2023-10-26 07:41:27 +00:00
>
Purple
</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: `
2023-10-26 07:41:27 +00:00
<div
v-ripple="{
pt: {
root: { style: 'background: rgba(75, 175, 80, 0.3)' }
}
}"
2024-01-24 10:57:05 +00:00
class="p-ripple box"
2024-01-26 10:32:22 +00:00
style="border: 1px solid rgba(75, 175, 80, 0.3)"
2023-10-26 07:41:27 +00:00
>
Green
</div>
<div
v-ripple="{
pt: {
root: { style: 'background: rgba(255, 193, 6, 0.3)' }
}
}"
2024-01-24 10:57:05 +00:00
class="p-ripple box"
2024-01-26 10:32:22 +00:00
style="border: 1px solid rgba(255, 193, 6, 0.3)"
2023-10-26 07:41:27 +00:00
>
Orange
</div>
<div
v-ripple="{
pt: {
root: { style: 'background: rgba(156, 39, 176, 0.3)' }
}
}"
2024-01-24 10:57:05 +00:00
class="p-ripple box"
2024-01-26 10:32:22 +00:00
style="border: 1px solid rgba(156, 39, 176, 0.3)"
2023-10-26 07:41:27 +00:00
>
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">
<div
v-ripple="{
pt: {
root: { style: 'background: rgba(75, 175, 80, 0.3)' }
}
}"
2024-01-24 10:57:05 +00:00
class="p-ripple box"
2024-01-26 10:32:22 +00:00
style="border: 1px solid rgba(75, 175, 80, 0.3)"
2023-10-26 07:41:27 +00:00
>
Green
</div>
<div
v-ripple="{
pt: {
root: { style: 'background: rgba(255, 193, 6, 0.3)' }
}
}"
2024-01-24 10:57:05 +00:00
class="p-ripple box"
2024-01-26 10:32:22 +00:00
style="border: 1px solid rgba(255, 193, 6, 0.3)"
2023-10-26 07:41:27 +00:00
>
Orange
</div>
<div
v-ripple="{
pt: {
root: { style: 'background: rgba(156, 39, 176, 0.3)' }
}
}"
2024-01-24 10:57:05 +00:00
class="p-ripple box"
2024-01-26 10:32:22 +00:00
style="border: 1px solid rgba(156, 39, 176, 0.3)"
2023-10-26 07:41:27 +00:00
>
Purple
</div>
2023-02-28 08:29:30 +00:00
</div>
</template>
<style scoped>
2023-09-26 12:14:16 +00:00
.box {
background: var(--surface-card);
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">
<div
v-ripple="{
pt: {
root: { style: 'background: rgba(75, 175, 80, 0.3)' }
}
}"
2024-01-24 10:57:05 +00:00
class="p-ripple box"
2024-01-26 10:32:22 +00:00
style="border: 1px solid rgba(75, 175, 80, 0.3)"
2023-10-26 07:41:27 +00:00
>
Green
</div>
<div
v-ripple="{
pt: {
root: { style: 'background: rgba(255, 193, 6, 0.3)' }
}
}"
2024-01-24 10:57:05 +00:00
class="p-ripple box"
2024-01-26 10:32:22 +00:00
style="border: 1px solid rgba(255, 193, 6, 0.3)"
2023-10-26 07:41:27 +00:00
>
Orange
</div>
<div
v-ripple="{
pt: {
root: { style: 'background: rgba(156, 39, 176, 0.3)' }
}
}"
2024-01-24 10:57:05 +00:00
class="p-ripple box"
2024-01-26 10:32:22 +00:00
style="border: 1px solid rgba(156, 39, 176, 0.3)"
2023-10-26 07:41:27 +00:00
>
Purple
</div>
2023-02-28 08:29:30 +00:00
</div>
</template>
<style scoped>
2023-09-26 12:14:16 +00:00
.box {
background: var(--surface-card);
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 {
background: var(--surface-card);
padding: 2rem;
border-radius: 10px;
width: 110px;
text-align: center;
}
2023-02-28 08:29:30 +00:00
</style>