mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-10-27 06:47:01 +00:00
f87d99f452
Use available admin space and make forms adapt to screen width. Preserve reply edits during resizing and improve widget feedback.
31 lines
599 B
Vue
31 lines
599 B
Vue
<script setup>
|
|
import { cn } from '@shared-ui/lib/utils'
|
|
|
|
const props = defineProps({
|
|
compact: { type: Boolean, default: false },
|
|
class: { type: null, required: false }
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
:class="cn('form-grid grid min-w-0 gap-5', { 'form-grid-compact': props.compact }, props.class)"
|
|
>
|
|
<slot />
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.form-grid {
|
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
|
|
}
|
|
|
|
.form-grid-compact {
|
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
|
|
}
|
|
|
|
.form-grid > :deep(*) {
|
|
min-width: 0;
|
|
}
|
|
</style>
|