[fix] better reponsive layout

This commit is contained in:
Arjan Singh
2025-09-16 18:59:55 -07:00
parent 81a0046396
commit de5bb01063
3 changed files with 8 additions and 3 deletions

View File

@@ -88,7 +88,7 @@ export const SingleAssetType: Story = {
nodeType: 'CheckpointLoaderSimple',
inputName: 'ckpt_name',
currentValue: '',
showLeftPanel: undefined
showLeftPanel: false
},
render: (args) => ({
components: { AssetBrowserModal },

View File

@@ -29,7 +29,6 @@
<template #content>
<AssetGrid
:class="{ 'max-w-5xl': !shouldShowLeftPanel }"
:assets="filteredAssets"
@asset-select="handleAssetSelectAndEmit"
/>

View File

@@ -1,7 +1,7 @@
<template>
<div
data-component-id="AssetGrid"
class="grid grid-cols-2 md:grid-cols-4 gap-6 p-8"
:style="gridStyle"
role="grid"
aria-label="Asset collection"
:aria-rowcount="-1"
@@ -49,7 +49,10 @@
</template>
<script setup lang="ts">
import { computed } from 'vue'
import type { AssetDisplayItem } from '@/platform/assets/composables/useAssetBrowser'
import { createGridStyle } from '@/utils/gridUtil'
import { cn } from '@/utils/tailwindUtil'
import AssetCard from './AssetCard.vue'
@@ -62,4 +65,7 @@ defineProps<{
defineEmits<{
assetSelect: [asset: AssetDisplayItem]
}>()
// Use same grid style as BaseModalLayout
const gridStyle = computed(() => createGridStyle())
</script>