20 lines
674 B
Vue
20 lines
674 B
Vue
<script setup lang="ts">
|
|
import { getModelConfig } from '~/utils/model-mapping';
|
|
|
|
const props = defineProps<{
|
|
modelId: string;
|
|
variant?: 'monochrome' | 'color';
|
|
size?: string | number;
|
|
avatar?: boolean;
|
|
}>();
|
|
|
|
const config = computed(() => getModelConfig(props.modelId));
|
|
</script>
|
|
|
|
<template>
|
|
<div class="inline-flex items-center justify-center">
|
|
<component :is="config.icon" v-if="config.icon" :avatar="avatar" :size="size" :color="variant === 'color'" />
|
|
<!-- Fallback if no logo matches -->
|
|
<div v-else :style="{ width: `${props.size}px`, height: `${props.size}px` }" class="bg-gray-200 rounded-full" />
|
|
</div>
|
|
</template> |