24 lines
586 B
Vue
24 lines
586 B
Vue
<script setup lang="ts">
|
|
import { computed } from 'vue';
|
|
import { SidebarInset } from '@/components/ui/sidebar';
|
|
import type { AppContentProps } from '@/types';
|
|
|
|
const props = withDefaults(defineProps<AppContentProps>(), {
|
|
variant: 'sidebar',
|
|
});
|
|
const className = computed(() => props.class);
|
|
</script>
|
|
|
|
<template>
|
|
<SidebarInset v-if="props.variant === 'sidebar'" :class="className">
|
|
<slot />
|
|
</SidebarInset>
|
|
<main
|
|
v-else
|
|
class="flex h-full w-full flex-1 flex-col gap-4"
|
|
:class="className"
|
|
>
|
|
<slot />
|
|
</main>
|
|
</template>
|