Files
speckle-server/packages/frontend-2/components/automate/function/CardView.vue
T
Benjamin Ottensten 7a6b772491 Proper fix of model and function card truncation (#2293)
* Improve model card grid

* Rewrite function card grid classes to fix truncation
2024-05-28 13:03:18 +02:00

26 lines
516 B
Vue

<template>
<div :class="classes">
<slot />
</div>
</template>
<script setup lang="ts">
const props = defineProps<{
smallView?: boolean
vertical?: boolean
}>()
const classes = computed(() => {
const classParts = ['grid gap-4 lg:gap-6']
if (props.vertical) {
classParts.push('grid-cols-1')
} else if (props.smallView) {
classParts.push('grid-cols-1 sm:grid-cols-2')
} else {
classParts.push('grid-cols-1 sm:grid-cols-2 lg:grid-cols-3')
}
return classParts.join(' ')
})
</script>