mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-11 01:42:34 +00:00
add TailwindDoc to Panels, Media, Misc, Buttons, Upload and Chart
This commit is contained in:
parent
cc392c38ad
commit
eb8687db09
56 changed files with 2605 additions and 29 deletions
84
doc/toolbar/theming/TailwindDoc.vue
Normal file
84
doc/toolbar/theming/TailwindDoc.vue
Normal file
|
@ -0,0 +1,84 @@
|
|||
<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 {
|
||||
toolbar: {
|
||||
root: {
|
||||
class: ['flex items-center justify-between flex-wrap', 'bg-gray-100 dark:bg-gray-800 border border-gray-300 dark:border-blue-900/40 p-5 rounded-md gap-2']
|
||||
},
|
||||
start: 'flex items-center',
|
||||
center: 'flex items-center',
|
||||
end: 'flex items-center'
|
||||
}
|
||||
}
|
||||
`
|
||||
},
|
||||
code2: {
|
||||
composition: `
|
||||
<template>
|
||||
<div class="card">
|
||||
<Toolbar>
|
||||
<template #start>
|
||||
<Button label="New" icon="pi pi-plus" class="mr-2" />
|
||||
<Button label="Upload" icon="pi pi-upload" severity="success" class="mr-2" />
|
||||
<i class="pi pi-bars text-gray-700 dark:text-white/80 mr-2" />
|
||||
<SplitButton label="Save" icon="pi pi-check" :model="items" severity="warning"></SplitButton>
|
||||
</template>
|
||||
|
||||
<template #end>
|
||||
<Button icon="pi pi-search" class="mr-2" />
|
||||
<Button icon="pi pi-calendar" severity="success" class="mr-2" />
|
||||
<Button icon="pi pi-times" severity="danger" />
|
||||
</template>
|
||||
</Toolbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
|
||||
const items = ref([
|
||||
{
|
||||
label: 'Update',
|
||||
icon: 'pi pi-refresh'
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
icon: 'pi pi-times'
|
||||
},
|
||||
{
|
||||
label: 'Vue Website',
|
||||
icon: 'pi pi-external-link',
|
||||
command: () => {
|
||||
window.location.href = 'https://vuejs.org/';
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Upload',
|
||||
icon: 'pi pi-upload',
|
||||
command: () => {
|
||||
this.$router.push('fileupload');
|
||||
}
|
||||
}
|
||||
])
|
||||
<\/script>`
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue