diff --git a/src/components/ui/FetchedTags.vue b/src/components/ui/FetchedTags.vue index a0edf85f8..481e3a475 100644 --- a/src/components/ui/FetchedTags.vue +++ b/src/components/ui/FetchedTags.vue @@ -16,7 +16,13 @@ const $props = defineProps({ required: false, default: 'value', }, + columns: { + type: Number, + required: false, + default: null, + }, }); + const tags = computed(() => { return Object.keys($props.item) .filter((i) => i.startsWith(`${$props.tag}`)) @@ -28,10 +34,21 @@ const tags = computed(() => { return acc; }, {}); }); + +const columnStyle = computed(() => { + if ($props.columns) { + return { + 'grid-template-columns': `repeat(${$props.columns}, 1fr)`, + 'max-width': `${$props.columns * 4}rem`, + }; + } + return {}; +}); + -