Tailwind docs updated

This commit is contained in:
Tuğçe Küçükoğlu 2023-08-07 14:27:39 +03:00
parent ef2561b710
commit f15fb3de24
127 changed files with 5368 additions and 2055 deletions

View file

@ -1,15 +1,54 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Theming is implemented with the pass through properties in unstyled mode. Example below demonstrates the built-in Tailwind theme.</p>
<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" :service="['ProductService']" embedded />
</DocSectionText>
<DocSectionCode :code="code" :service="['ProductService']" embedded />
</template>
<script>
export default {
data() {
return {
code: {
code1: {
basic: `
export default {
dataview: {
content: {
class: [
'bg-white blue-gray-700 border-0 p-0',
'dark:bg-gray-900 dark:text-white/80' // Dark Mode
]
},
grid: 'flex flex-wrap ml-0 mr-0 mt-0 bg-white dark:bg-gray-900',
header: 'bg-gray-100 dark:bg-gray-800 text-gray-800 dark:text-white/80 border-gray-200 dark:border-blue-900/40 border-t border-b p-4 font-bold'
},
dataviewlayoutoptions: {
listbutton: ({ props }) => ({
class: [
'items-center cursor-pointer inline-flex overflow-hidden relative select-none text-center align-bottom justify-center border',
'transition duration-200',
'w-12 pt-3 pb-3 rounded-lg rounded-r-none',
props.modelValue === 'list' ? 'bg-blue-500 border-blue-500 text-white dark:bg-sky-300 dark:border-sky-300 dark:text-gray-900' : 'bg-white border-gray-300 text-blue-gray-700 dark:bg-gray-900 dark:border-blue-900/40 dark:text-white/80' // highlighted state
]
}),
gridbutton: ({ props }) => ({
class: [
'items-center cursor-pointer inline-flex overflow-hidden relative select-none text-center align-bottom justify-center border',
'transition duration-200',
'w-12 pt-3 pb-3 rounded-lg rounded-l-none',
props.modelValue === 'grid' ? 'bg-blue-500 border-blue-500 text-white dark:bg-sky-300 dark:border-sky-300 dark:text-gray-900' : 'bg-white border-gray-300 text-blue-gray-700 dark:bg-gray-900 dark:border-blue-900/40 dark:text-white/80' // highlighted state
]
})
}
}
`
},
code2: {
composition: `
<template>
<div class="card">
@ -100,23 +139,7 @@ const getSeverity = (product) => {
}
}
<\/script>`,
data: `
/* ProductService */
{
id: '1000',
code: 'f230fh0g3',
name: 'Bamboo Watch',
description: 'Product Description',
image: 'bamboo-watch.jpg',
price: 65,
category: 'Accessories',
quantity: 24,
inventoryStatus: 'INSTOCK',
rating: 5
},
...
`
<\/script>`
}
};
}

View file

@ -10,7 +10,7 @@
<script>
import StyledDoc from './StyledDoc.vue';
import UnstyledDoc from './UnstyledDoc.vue';
import TailwindDoc from './TailwindDoc.vue';
export default {
data() {
@ -24,7 +24,14 @@ export default {
{
id: 'unstyled',
label: 'Unstyled',
component: UnstyledDoc
description: 'Theming is implemented with the pass through properties in unstyled mode.',
children: [
{
id: 'tailwind',
label: 'Tailwind',
component: TailwindDoc
}
]
}
]
};