frontend/app/components/typography/layout/row.vue
2025-12-09 22:32:22 +01:00

26 lines
600 B
Vue

<script setup lang="ts">
import { Primitive, type PrimitiveProps } from "reka-ui";
import type { HTMLAttributes } from "vue";
import { cn } from "~/lib/utils";
interface Props extends PrimitiveProps {
class?: HTMLAttributes["class"];
wrap?: boolean;
centered?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
as: "div",
});
</script>
<template>
<Primitive
:as="as"
:as-child="asChild"
:class="cn('flex flex-row', props.wrap && 'flex-wrap', props.class, props.centered && 'items-center')"
>
<slot/>
</Primitive>
</template>