fix: enhance CardContainer and MultiSelect components with improved props handling and filtering logic

This commit is contained in:
Johnpaul
2025-09-13 02:35:00 +01:00
parent 6844b77899
commit 578bb54437
3 changed files with 51 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div :class="containerClasses">
<div :class="containerClasses" :style="containerStyle">
<slot name="top"></slot>
<slot name="bottom"></slot>
</div>
@@ -8,8 +8,14 @@
<script setup lang="ts">
import { computed } from 'vue'
const { ratio = 'square' } = defineProps<{
ratio?: 'square' | 'portrait' | 'tallPortrait'
const {
ratio = 'square',
maxWidth,
minWidth
} = defineProps<{
maxWidth?: number
minWidth?: number
ratio?: 'square' | 'portrait' | 'tallPortrait' | 'none'
}>()
const containerClasses = computed(() => {
@@ -25,4 +31,13 @@ const containerClasses = computed(() => {
return `${baseClasses} ${ratioClasses[ratio]}`
})
const containerStyle = computed(() =>
maxWidth || minWidth
? {
maxWidth: `${maxWidth}px`,
minWidth: `${minWidth}px`
}
: {}
)
</script>