primevue-mirror/apps/showcase/doc/theming/unstyled/ExampleDoc.vue

41 lines
1.3 KiB
Vue
Raw Normal View History

2023-07-09 21:13:49 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>
2024-07-03 10:28:54 +00:00
Here is a sample that provides a style using Tailwind CSS. Before beginning, head over to the pass through section <NuxtLink to="/button">button</NuxtLink> documentation to learn more about the components internals. We'll be using the
<i>root</i>, <i>label</i> and <i>icon</i> elements to add a custom style.
2023-07-09 21:13:49 +00:00
</p>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center">
2024-07-03 10:30:21 +00:00
<Button
label="Search"
icon="pi pi-search"
unstyled
pt:root="bg-teal-500 hover:bg-teal-700 active:bg-teal-900 cursor-pointer py-2 px-4 rounded-full border-0 flex gap-2"
pt:label="text-white font-bold text-lg"
pt:icon="text-white text-xl"
/>
2023-07-09 21:13:49 +00:00
</div>
2024-07-03 10:28:54 +00:00
<DocSectionCode :code="code" hideToggleCode hideStackBlitz />
2023-07-09 21:13:49 +00:00
</DocSectionText>
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
2024-07-03 10:30:21 +00:00
<Button
label="Search"
icon="pi pi-search"
unstyled
pt:root="bg-teal-500 hover:bg-teal-700 active:bg-teal-900 cursor-pointer py-2 px-4 rounded-full border-0 flex gap-2"
pt:label="text-white font-bold text-lg"
pt:icon="text-white text-xl"
/>
2023-10-15 09:38:39 +00:00
`
2023-07-09 21:13:49 +00:00
}
};
}
};
</script>