mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-01 20:57:57 +01:00
feat(Select/SelectMenu): handle size prop (#133)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import theme from '#build/ui/chip'
|
||||
|
||||
const sizes = Object.keys(theme.variants.size)
|
||||
const positions = Object.keys(theme.variants.position)
|
||||
const sizes = Object.keys(theme.variants.size) as Array<keyof typeof theme.variants.size>
|
||||
const positions = Object.keys(theme.variants.position) as Array<keyof typeof theme.variants.position>
|
||||
|
||||
const items = [{
|
||||
name: 'messages',
|
||||
@@ -18,7 +18,7 @@ const items = [{
|
||||
<template>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex items-center gap-2">
|
||||
<UChip v-for="position in positions" :key="position" :position="(position as any)">
|
||||
<UChip v-for="position in positions" :key="position" :position="position">
|
||||
<UButton icon="i-heroicons-inbox" color="gray" />
|
||||
</UChip>
|
||||
</div>
|
||||
@@ -30,7 +30,7 @@ const items = [{
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<UChip v-for="size in sizes" :key="size" :size="(size as any)" inset text="1">
|
||||
<UChip v-for="size in sizes" :key="size" :size="size" inset text="1">
|
||||
<UAvatar src="https://avatars.githubusercontent.com/u/739984?v=4" />
|
||||
</UChip>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user