|
| 1 | +<script setup lang="ts"> |
| 2 | +import theme from '#build/ui/toolbar' |
| 3 | +
|
| 4 | +const variants = Object.keys(theme.variants.variant) |
| 5 | +
|
| 6 | +const variant = ref(theme.defaultVariants.variant) |
| 7 | +const title = ref('Toolbar Title') |
| 8 | +</script> |
| 9 | + |
| 10 | +<template> |
| 11 | + <div class=" space-y-4"> |
| 12 | + <div class="space-x-2"> |
| 13 | + <UButtonGroup> |
| 14 | + <UBadge color="neutral" variant="outline" size="lg" label="title" /> |
| 15 | + |
| 16 | + <UInput v-model="title" :highlight="false" /> |
| 17 | + </UButtonGroup> |
| 18 | + |
| 19 | + <UButtonGroup> |
| 20 | + <UBadge color="neutral" variant="outline" size="lg" label="variant" /> |
| 21 | + |
| 22 | + <USelect v-model="variant" :items="variants" /> |
| 23 | + </UButtonGroup> |
| 24 | + </div> |
| 25 | + <UToolbar :variant="variant"> |
| 26 | + <Placeholder class="w-full h-8" /> |
| 27 | + </UToolbar> |
| 28 | + |
| 29 | + <UToolbar :variant="variant"> |
| 30 | + <template #left> |
| 31 | + <Placeholder class="w-40 h-8" /> |
| 32 | + </template> |
| 33 | + <template #center> |
| 34 | + <Placeholder class="w-40 h-8" /> |
| 35 | + </template> |
| 36 | + <template #right> |
| 37 | + <Placeholder class="w-40 h-8" /> |
| 38 | + </template> |
| 39 | + </UToolbar> |
| 40 | + |
| 41 | + <UToolbar :variant="variant"> |
| 42 | + <template #left> |
| 43 | + <Placeholder class="w-40 h-8" /> |
| 44 | + </template> |
| 45 | + </UToolbar> |
| 46 | + |
| 47 | + <UToolbar :variant="variant"> |
| 48 | + <template #center> |
| 49 | + <Placeholder class="w-40 h-8" /> |
| 50 | + </template> |
| 51 | + </UToolbar> |
| 52 | + |
| 53 | + <UToolbar :variant="variant"> |
| 54 | + <template #right> |
| 55 | + <Placeholder class="w-40 h-8" /> |
| 56 | + </template> |
| 57 | + </UToolbar> |
| 58 | + |
| 59 | + <UToolbar :title="title" /> |
| 60 | + <UToolbar :title="title" variant="outline" :ui="{ root: 'border-x-0' }" /> |
| 61 | + <UToolbar :title="title" variant="outline" class="border-0 border-b" /> |
| 62 | + <UToolbar :title="title" variant="soft" /> |
| 63 | + <UToolbar :title="title" variant="subtle" /> |
| 64 | + <UToolbar :title="title" variant="solid" /> |
| 65 | + </div> |
| 66 | +</template> |
0 commit comments