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

57 lines
1.9 KiB
Vue
Raw Normal View History

2023-08-07 12:40:22 +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 12:40:22 +00:00
<DocSectionCode :code="code2" embedded />
</DocSectionText>
</template>
<script>
export default {
data() {
return {
code1: {
2023-10-15 09:38:39 +00:00
basic: `
export default {
2023-08-07 12:40:22 +00:00
inlinemessage: {
root: ({ props }) => ({
class: [
'inline-flex items-center justify-center align-top',
'p-3 m-0 rounded-md',
{
'bg-blue-100 border-0 text-blue-700': props.severity == 'info',
'bg-green-100 border-0 text-green-700': props.severity == 'success',
'bg-orange-100 border-0 text-orange-700': props.severity == 'warn',
'bg-red-100 border-0 text-red-700': props.severity == 'error'
}
]
}),
icon: 'text-base mr-2'
}
}
`
},
code2: {
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-08-07 12:40:22 +00:00
<div class="card flex flex-wrap items-center justify-center gap-3">
<InlineMessage severity="success">Success Content</InlineMessage>
<InlineMessage severity="info">Info Content</InlineMessage>
<InlineMessage severity="warn">Warning Content</InlineMessage>
<InlineMessage severity="error">Error Content</InlineMessage>
</div>
</template>
<script setup>
2023-10-15 09:38:39 +00:00
<\/script>
`
2023-08-07 12:40:22 +00:00
}
};
}
};
</script>