mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Tailwind docs updated
This commit is contained in:
parent
ef2561b710
commit
f15fb3de24
127 changed files with 5368 additions and 2055 deletions
83
doc/menu/theming/TailwindDoc.vue
Normal file
83
doc/menu/theming/TailwindDoc.vue
Normal file
|
@ -0,0 +1,83 @@
|
|||
<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
|
||||
<PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> 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 const TRANSITIONS = {
|
||||
toggleable: {
|
||||
enterFromClass: 'max-h-0',
|
||||
enterActiveClass: 'overflow-hidden transition-all duration-500 ease-in-out',
|
||||
enterToClass: 'max-h-40 ',
|
||||
leaveFromClass: 'max-h-40',
|
||||
leaveActiveClass: 'overflow-hidden transition-all duration-500 ease-in',
|
||||
leaveToClass: 'max-h-0'
|
||||
},
|
||||
overlay: {
|
||||
enterFromClass: 'opacity-0 scale-75',
|
||||
enterActiveClass: 'transition-transform transition-opacity duration-150 ease-in',
|
||||
leaveActiveClass: 'transition-opacity duration-150 ease-linear',
|
||||
leaveToClass: 'opacity-0'
|
||||
}
|
||||
};
|
||||
|
||||
export default {
|
||||
menu: {
|
||||
root: 'py-1 bg-white dark:bg-gray-900 text-gray-700 dark:text-white/80 border border-gray-300 dark:border-blue-900/40 rounded-md w-48',
|
||||
menu: {
|
||||
class: ['m-0 p-0 list-none', 'outline-none']
|
||||
},
|
||||
content: ({ context }) => ({
|
||||
class: [
|
||||
'text-gray-700 dark:text-white/80 transition-shadow duration-200 rounded-none',
|
||||
'hover:text-gray-700 dark:hover:text-white/80 hover:bg-gray-200 dark:hover:bg-gray-800/80', // Hover
|
||||
{
|
||||
'bg-gray-300 text-gray-700 dark:text-white/80 dark:bg-gray-800/90': context.focused
|
||||
}
|
||||
]
|
||||
}),
|
||||
action: {
|
||||
class: ['text-gray-700 dark:text-white/80 py-3 px-5 select-none', 'cursor-pointer flex items-center no-underline overflow-hidden relative']
|
||||
},
|
||||
icon: 'text-gray-600 dark:text-white/70 mr-2',
|
||||
submenuheader: {
|
||||
class: ['m-0 p-3 text-gray-700 dark:text-white/80 bg-white dark:bg-gray-900 font-bold rounded-tl-none rounded-tr-none']
|
||||
},
|
||||
transition: TRANSITIONS.overlay
|
||||
}
|
||||
}
|
||||
`
|
||||
},
|
||||
code2: {
|
||||
composition: `
|
||||
<template>
|
||||
<div class="card flex justify-center">
|
||||
<Menu :model="items" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
const items = ref([
|
||||
{ label: 'New', icon: 'pi pi-fw pi-plus' },
|
||||
{ label: 'Delete', icon: 'pi pi-fw pi-trash' }
|
||||
]);
|
||||
<\/script>`
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue