2023-08-07 08:24:23 +00:00
|
|
|
<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
|
|
|
|
<NuxtLink to="/tailwind">Tailwind Customization</NuxtLink> section for an example.
|
|
|
|
</p>
|
|
|
|
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz />
|
|
|
|
<p>A playground sample with the pre-built Tailwind theme.</p>
|
|
|
|
<DocSectionCode :code="code2" embedded />
|
|
|
|
</DocSectionText>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code1: {
|
|
|
|
basic: `
|
|
|
|
export default {
|
|
|
|
image: {
|
|
|
|
root: 'relative inline-block',
|
|
|
|
button: {
|
|
|
|
class: [
|
|
|
|
'absolute inset-0 flex items-center justify-center opacity-0 transition-opacity duration-300',
|
|
|
|
'bg-transparent text-gray-100',
|
|
|
|
'hover:opacity-100 hover:cursor-pointer hover:bg-black hover:bg-opacity-50' //Hover
|
|
|
|
]
|
|
|
|
},
|
|
|
|
mask: {
|
|
|
|
class: ['fixed top-0 left-0 w-full h-full', 'flex items-center justify-center', 'bg-black bg-opacity-90']
|
|
|
|
},
|
|
|
|
toolbar: {
|
|
|
|
class: ['absolute top-0 right-0 flex', 'p-4']
|
|
|
|
},
|
|
|
|
rotaterightbutton: {
|
|
|
|
class: [
|
|
|
|
'flex justify-center items-center',
|
|
|
|
'text-white bg-transparent w-12 h-12 rounded-full transition duration-200 ease-in-out mr-2',
|
|
|
|
'hover:text-white hover:bg-white/10',
|
|
|
|
'focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)]'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
rotaterighticon: 'w-6 h-6',
|
|
|
|
rotateleftbutton: {
|
|
|
|
class: [
|
|
|
|
'flex justify-center items-center',
|
|
|
|
'text-white bg-transparent w-12 h-12 rounded-full transition duration-200 ease-in-out mr-2',
|
|
|
|
'hover:text-white hover:bg-white/10',
|
|
|
|
'focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)]'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
rotatelefticon: 'w-6 h-6',
|
|
|
|
zoomoutbutton: {
|
|
|
|
class: [
|
|
|
|
'flex justify-center items-center',
|
|
|
|
'text-white bg-transparent w-12 h-12 rounded-full transition duration-200 ease-in-out mr-2',
|
|
|
|
'hover:text-white hover:bg-white/10',
|
|
|
|
'focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)]'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
zoomouticon: 'w-6 h-6',
|
|
|
|
zoominbutton: {
|
|
|
|
class: [
|
|
|
|
'flex justify-center items-center',
|
|
|
|
'text-white bg-transparent w-12 h-12 rounded-full transition duration-200 ease-in-out mr-2',
|
|
|
|
'hover:text-white hover:bg-white/10',
|
|
|
|
'focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)]'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
zoominicon: 'w-6 h-6',
|
|
|
|
closebutton: {
|
|
|
|
class: [
|
|
|
|
'flex justify-center items-center',
|
|
|
|
'text-white bg-transparent w-12 h-12 rounded-full transition duration-200 ease-in-out mr-2',
|
|
|
|
'hover:text-white hover:bg-white/10',
|
|
|
|
'focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)]'
|
|
|
|
]
|
|
|
|
},
|
2023-08-07 10:42:03 +00:00
|
|
|
closeicon: 'w-6 h-6',
|
|
|
|
transition: {
|
|
|
|
enterFromClass: 'opacity-0 scale-75',
|
|
|
|
enterActiveClass: 'transition-all duration-150 ease-in-out',
|
|
|
|
leaveActiveClass: 'transition-all duration-150 ease-in',
|
|
|
|
leaveToClass: 'opacity-0 scale-75'
|
|
|
|
}
|
2023-08-07 08:24:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`
|
|
|
|
},
|
|
|
|
code2: {
|
|
|
|
composition: `
|
|
|
|
<template>
|
|
|
|
<div class="card flex justify-center">
|
|
|
|
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria10.jpg" alt="Image" width="250" preview />
|
|
|
|
</div>
|
|
|
|
</template>`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|