30 lines
895 B
Vue
30 lines
895 B
Vue
<script setup lang="ts">
|
|
import type { PrimitiveProps } from "reka-ui"
|
|
import type { HTMLAttributes } from "vue"
|
|
import type { ContainerVariants } from "."
|
|
import { cn } from "@/lib/utils"
|
|
import { containerVariants } from "."
|
|
|
|
|
|
interface Props extends PrimitiveProps {
|
|
border?: ContainerVariants["border"]
|
|
borderRadius?: ContainerVariants["borderRadius"]
|
|
borderPlacement?: ContainerVariants["borderPlacement"]
|
|
background?: ContainerVariants["background"]
|
|
padding?: ContainerVariants["padding"]
|
|
margin?: ContainerVariants["margin"]
|
|
class?: HTMLAttributes["class"]
|
|
}
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
as: "container",
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div :as="as" :as-child="asChild"
|
|
:class="cn(containerVariants({ border, borderRadius, borderPlacement, background, padding, margin }), props.class)">
|
|
<slot />
|
|
</div>
|
|
</template>
|