primevue-mirror/doc/ripple/CustomDoc.vue

106 lines
2.9 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-09-26 12:14:16 +00:00
<div v-ripple class="p-ripple box styled-box-green shadow-2">Green</div>
<div v-ripple class="p-ripple box styled-box-orange shadow-2">Orange</div>
<div v-ripple class="p-ripple box styled-box-purple shadow-2">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-09-26 12:14:16 +00:00
<div v-ripple class="p-ripple box styled-box-green shadow-2">Green</div>
<div v-ripple class="p-ripple box styled-box-orange shadow-2">Orange</div>
<div v-ripple class="p-ripple box styled-box-purple shadow-2">Purple</div>`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-02-28 08:29:30 +00:00
<div class="flex justify-content-center align-items-center">
2023-09-26 12:14:16 +00:00
<div v-ripple class="p-ripple box styled-box-green shadow-2">Green</div>
<div v-ripple class="p-ripple box styled-box-orange shadow-2">Orange</div>
<div v-ripple class="p-ripple box styled-box-purple shadow-2">Purple</div>
2023-02-28 08:29:30 +00:00
</div>
</template>
<style scoped>
::v-deep(.styled-box-green .p-ink) {
background: rgba(75, 175, 80, 0.3);
}
::v-deep(.styled-box-orange .p-ink) {
background: rgba(255, 193, 6, 0.3);
}
::v-deep(.styled-box-purple .p-ink) {
background: rgba(156, 39, 176, 0.3);
}
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>`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 08:29:30 +00:00
<div class="flex justify-content-center align-items-center">
2023-09-26 12:14:16 +00:00
<div v-ripple class="p-ripple box styled-box-green shadow-2">Green</div>
<div v-ripple class="p-ripple box styled-box-orange shadow-2">Orange</div>
<div v-ripple class="p-ripple box styled-box-purple shadow-2">Purple</div>
2023-02-28 08:29:30 +00:00
</div>
</template>
<style scoped>
::v-deep(.styled-box-green .p-ink) {
background: rgba(75, 175, 80, 0.3);
}
::v-deep(.styled-box-orange .p-ink) {
background: rgba(255, 193, 6, 0.3);
}
::v-deep(.styled-box-purple .p-ink) {
background: rgba(156, 39, 176, 0.3);
}
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>`
}
};
}
};
</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
::v-deep(.styled-box-green .p-ink) {
background: rgba(75, 175, 80, 0.3);
}
::v-deep(.styled-box-orange .p-ink) {
background: rgba(255, 193, 6, 0.3);
}
::v-deep(.styled-box-purple .p-ink) {
background: rgba(156, 39, 176, 0.3);
}
</style>