primevue-mirror/doc/ripple/theming/TailwindDoc.vue

62 lines
1.6 KiB
Vue
Raw Normal View History

<template>
<DocSectionText v-bind="$attrs">
<p>
PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the
2023-08-07 12:40:22 +00:00
<PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example.
</p>
2023-09-22 12:54:14 +00:00
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz scrollable />
2023-08-16 13:58:31 +00:00
<p class="mt-4">A playground sample with the pre-built Tailwind theme.</p>
<DocSectionCode :code="code2" embedded />
</DocSectionText>
</template>
<script>
export default {
data() {
return {
code1: {
2023-09-22 12:54:14 +00:00
basic: `export default {
2023-08-07 12:40:22 +00:00
global: {
css: \`
*[data-pd-ripple="true"]{
overflow: hidden;
position: relative;
}
span[data-p-ink-active="true"]{
animation: ripple 0.4s linear;
}
@keyframes ripple {
100% {
opacity: 0;
transform: scale(2.5);
}
}
\`
},
directives: {
ripple: {
root: {
class: ['block absolute bg-white/50 rounded-full pointer-events-none'],
style: 'transform: scale(0)'
}
}
}
}
`
},
code2: {
2023-09-22 12:54:14 +00:00
composition: `
<template>
<div class="card flex justify-center">
<Button label="Submit" />
</div>
</template>
<script setup>
<\/script>`
}
};
}
};
</script>