Tailwind demos are transfered to tailwind.primevue.org

This commit is contained in:
tugcekucukoglu 2023-12-12 11:07:30 +03:00
parent 4e1bf7a0d5
commit 015b30e14e
93 changed files with 271 additions and 9437 deletions

View file

@ -1,76 +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 {
fileupload: {
input: 'hidden',
buttonbar: {
class: ['flex flex-wrap', 'bg-gray-50 dark:bg-gray-800 p-5 border border-solid border-gray-300 dark:border-blue-900/40 text-gray-700 dark:text-white/80 rounded-tr-lg rounded-tl-lg gap-2 border-b-0']
},
chooseButton: {
class: ['text-white bg-blue-500 border border-blue-500 p-3 px-5 rounded-md text-base', 'overflow-hidden relative']
},
chooseIcon: 'mr-2 inline-block',
chooseButtonLabel: 'flex-1 font-bold',
uploadbutton: {
icon: 'mr-2'
},
cancelbutton: {
icon: 'mr-2'
},
content: {
class: ['relative', 'bg-white dark:bg-gray-900 p-8 border border-gray-300 dark:border-blue-900/40 text-gray-700 dark:text-white/80 rounded-b-lg']
},
file: {
class: ['flex items-center flex-wrap', 'p-4 border border-gray-300 dark:border-blue-900/40 rounded gap-2 mb-2', 'last:mb-0']
},
thumbnail: 'shrink-0',
fileName: 'mb-2',
fileSize: 'mr-2',
uploadicon: 'mr-2'
}
}
`
},
code2: {
composition: `
<template>
<div class="card">
<Toast />
<FileUpload name="demo[]" url="./upload.php" @upload="onAdvancedUpload($event)" :multiple="true" accept="image/*" :maxFileSize="1000000">
<template #empty>
<p>Drag and drop files to here to upload.</p>
</template>
</FileUpload>
</div>
</template>
<script setup>
import { useToast } from "primevue/usetoast";
const toast = useToast();
const onAdvancedUpload = () => {
toast.add({ severity: 'info', summary: 'Success', detail: 'File Uploaded', life: 3000 });
};
<\/script>
`
}
};
}
};
</script>