mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
Tailwind demos are transfered to tailwind.primevue.org
This commit is contained in:
parent
4e1bf7a0d5
commit
015b30e14e
93 changed files with 271 additions and 9437 deletions
|
@ -1,97 +1,6 @@
|
|||
<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 scrollable />
|
||||
<p class="mt-4">A playground sample with the pre-built Tailwind theme.</p>
|
||||
<DocSectionCode :code="code2" embedded />
|
||||
Visit <a href="https://github.com/primefaces/primevue-tailwind" target="_blank" rel="noopener noreferrer">Tailwind Presets</a> project for detailed documentation, examples and ready-to-use presets about how to style PrimeVue components with
|
||||
Tailwind CSS.
|
||||
</DocSectionText>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
code1: {
|
||||
basic: `
|
||||
export default {
|
||||
slider: {
|
||||
root: ({ props }) => ({
|
||||
class: [
|
||||
'relative',
|
||||
'bg-gray-100 dark:bg-gray-800 border-0 rounded-6',
|
||||
{ 'h-1 w-56': props.orientation == 'horizontal', 'w-1 h-56': props.orientation == 'vertical' },
|
||||
{ 'opacity-60 select-none pointer-events-none cursor-default': props.disabled }
|
||||
]
|
||||
}),
|
||||
range: ({ props }) => ({
|
||||
class: [
|
||||
'bg-blue-500',
|
||||
'block absolute',
|
||||
{
|
||||
'top-0 left-0 h-full': props.orientation == 'horizontal',
|
||||
'bottom-0 left-0 w-full': props.orientation == 'vertical'
|
||||
}
|
||||
]
|
||||
}),
|
||||
handle: ({ props }) => ({
|
||||
class: [
|
||||
'h-4 w-4 bg-white dark:bg-gray-600 border-2 border-blue-500 rounded-full transition duration-200',
|
||||
'cursor-grab touch-action-none block',
|
||||
'focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]',
|
||||
'hover:bg-blue-500 hover:border hover:border-blue-500',
|
||||
{
|
||||
'top-[50%] mt-[-0.5715rem] ml-[-0.5715rem]': props.orientation == 'horizontal',
|
||||
'left-[50%] mb-[-0.5715rem] ml-[-0.4715rem]': props.orientation == 'vertical'
|
||||
}
|
||||
]
|
||||
}),
|
||||
starthandler: ({ props }) => ({
|
||||
class: [
|
||||
'h-4 w-4 bg-white dark:bg-gray-600 border-2 border-blue-500 rounded-full transition duration-200',
|
||||
'cursor-grab touch-action-none block',
|
||||
'focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]',
|
||||
'hover:bg-blue-500 hover:border hover:border-blue-500',
|
||||
{
|
||||
'top-[50%] mt-[-0.5715rem] ml-[-0.5715rem]': props.orientation == 'horizontal',
|
||||
'left-[50%] mb-[-0.5715rem] ml-[-0.4715rem]': props.orientation == 'vertical'
|
||||
}
|
||||
]
|
||||
}),
|
||||
endhandler: ({ props }) => ({
|
||||
class: [
|
||||
'h-4 w-4 bg-white dark:bg-gray-600 border-2 border-blue-500 rounded-full transition duration-200',
|
||||
'cursor-grab touch-action-none block',
|
||||
'focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]',
|
||||
'hover:bg-blue-500 hover:border hover:border-blue-500',
|
||||
{
|
||||
'top-[50%] mt-[-0.5715rem] ml-[-0.5715rem]': props.orientation == 'horizontal',
|
||||
'left-[50%] mb-[-0.5715rem] ml-[-0.4715rem]': props.orientation == 'vertical'
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
`
|
||||
},
|
||||
code2: {
|
||||
composition: `
|
||||
<template>
|
||||
<div class="card flex justify-center">
|
||||
<Slider v-model="value" class="w-14rem" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
|
||||
const value = ref(null);
|
||||
<\/script>
|
||||
`
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue