Skip to content

Commit a2563eb

Browse files
committed
fix: type error on element render
1 parent 84d2a83 commit a2563eb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

web/pages/index.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import { serverState } from '~/_data/serverState';
1212
import type { SendPayloads } from '~/store/callback';
1313
import AES from 'crypto-js/aes';
1414
import BrandButton from '~/components/Brand/Button.vue';
15+
import type { ButtonStyle } from '~/types/ui/button';
16+
import type { UiBadgePropsColor } from '~/types/ui/badge';
1517
const { registerEntry } = useCustomElements();
1618
onBeforeMount(() => {
1719
registerEntry('UnraidComponents');
@@ -131,14 +133,14 @@ onMounted(() => {
131133
<hr class="border-black dark:border-white" />
132134
<h2 class="text-xl font-semibold font-mono">Legacy Badge Components</h2>
133135
<template v-for="color in ['black', 'white', 'red', 'yellow', 'green', 'blue', 'indigo', 'purple', 'pink', 'orange', 'transparent', 'current', 'gray', 'custom']" :key="color">
134-
<UiBadge size="14px" :icon="ExclamationTriangleIcon" :color="color">{{ color }}</UiBadge>
136+
<UiBadge size="14px" :icon="ExclamationTriangleIcon" :color="color as UiBadgePropsColor">{{ color }}</UiBadge>
135137
</template>
136138
</div>
137139
<div class="bg-background">
138140
<hr class="border-black dark:border-white" />
139141
<h2 class="text-xl font-semibold font-mono">Legacy Button Components</h2>
140142
<template v-for="color in ['black', 'fill', 'gray', 'outline', 'outline-black', 'outline-white', 'underline', 'underline-hover-red', 'white',]" :key="color">
141-
<BrandButton type="button" size="14px" :icon="ExclamationTriangleIcon" :btn-style="color">{{ color }}</BrandButton>
143+
<BrandButton type="button" size="14px" :icon="ExclamationTriangleIcon" :btn-style="color as ButtonStyle">{{ color }}</BrandButton>
142144
</template>
143145
</div>
144146
</div>

0 commit comments

Comments
 (0)