primevue-mirror/doc/editor/theming/TailwindDoc.vue

53 lines
1.6 KiB
Vue
Raw Normal View History

2023-08-07 11:27:39 +00:00
<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>
2023-09-22 12:54:14 +00:00
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz scrollable />
2023-08-16 13:58:31 +00:00
<p class="mt-4">A playground sample with the pre-built Tailwind theme.</p>
2023-08-07 11:27:39 +00:00
<DocSectionCode :code="code2" :dependencies="{ quill: '1.3.7' }" component="Editor" embedded />
</DocSectionText>
</template>
<script>
export default {
data() {
return {
code1: {
2023-10-15 09:38:39 +00:00
basic: `
export default {
2023-08-07 11:27:39 +00:00
editor: {
toolbar: {
class: ['bg-gray-100 rounded-tr-md rounded-tl-md', 'border border-gray-300 box-border font-sans px-2 py-1']
},
formats: {
class: ['inline-block align-middle', 'mr-4']
},
header: {
class: ['text-gray-700 inline-block float-left text-base font-medium h-6 relative align-middle', 'w-28', 'border-0 text-gray-600']
}
}
}
`
},
code2: {
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-08-07 11:27:39 +00:00
<div class="card">
<Editor v-model="value" editorStyle="height: 320px" />
</div>
</template>
<script setup>
import { ref } from "vue";
const value = ref('');
2023-10-15 09:38:39 +00:00
<\/script>
`
2023-08-07 11:27:39 +00:00
}
};
}
};
</script>