mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-03 14:54:37 +00:00
fix: refactor containerClasses and containerStyle to use cn() and prevent undefined behaviour
This commit is contained in:
@@ -7,11 +7,13 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
|
||||
import { cn } from '@/utils/tailwindUtil'
|
||||
|
||||
const { fullHeight = true } = defineProps<{
|
||||
fullHeight?: boolean
|
||||
}>()
|
||||
|
||||
const containerClasses = computed(
|
||||
() => `flex-1 w-full${fullHeight ? ' h-full' : ''}`
|
||||
const containerClasses = computed(() =>
|
||||
cn('flex-1 w-full', fullHeight && 'h-full')
|
||||
)
|
||||
</script>
|
||||
|
||||
@@ -35,8 +35,8 @@ const containerClasses = computed(() => {
|
||||
const containerStyle = computed(() =>
|
||||
maxWidth || minWidth
|
||||
? {
|
||||
maxWidth: `${maxWidth}px`,
|
||||
minWidth: `${minWidth}px`
|
||||
maxWidth: maxWidth ? `${maxWidth}px` : undefined,
|
||||
minWidth: minWidth ? `${minWidth}px` : undefined
|
||||
}
|
||||
: {}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user