primevue-mirror/doc/timeline/theming/UnstyledDoc.vue

58 lines
1.8 KiB
Vue

<template>
<DocSectionText v-bind="$attrs">
<p>Theming is implemented with the pass through properties in unstyled mode. Example below demonstrates the built-in Tailwind theme.</p>
</DocSectionText>
<DocSectionCode :code="code" embedded />
</template>
<script>
export default {
data() {
return {
code: {
composition: `
<template>
<div class="card flex flex-wrap gap-6">
<Timeline :value="events" class="w-full md:w-80">
<template #content="slotProps">
<span class="text-gray-700 dark:text-white/80">
{{ slotProps.item.status }}
</span>
</template>
</Timeline>
<Timeline :value="events" align="right" class="w-full md:w-80">
<template #content="slotProps">
<span class="text-gray-700 dark:text-white/80">
{{ slotProps.item.status }}
</span>
</template>
</Timeline>
<Timeline :value="events" align="alternate" class="w-full md:w-80">
<template #content="slotProps">
<span class="text-gray-700 dark:text-white/80">
{{ slotProps.item.status }}
</span>
</template>
</Timeline>
</div>
</template>
<script setup>
import { ref } from "vue";
const events = ref([
{ status: 'Ordered', date: '15/10/2020 10:30', icon: 'pi pi-shopping-cart', color: '#9C27B0'},
{ status: 'Processing', date: '15/10/2020 14:00', icon: 'pi pi-cog', color: '#673AB7' },
{ status: 'Shipped', date: '15/10/2020 16:15', icon: 'pi pi-shopping-cart', color: '#FF9800' },
{ status: 'Delivered', date: '16/10/2020 10:00', icon: 'pi pi-check', color: '#607D8B' }
]);
<\/script>`
}
};
}
};
</script>