Migration to nuxt 4
Used codemods CLI and reworked most alias'd path that stopped working
This commit is contained in:
30
app/components/global/Spacing.vue
Normal file
30
app/components/global/Spacing.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<script lang="ts" setup>
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
interface SpacingProps {
|
||||
size?: "xs" | "sm" | "md" | "lg" | "xlg" | "2xl" | "3xl"
|
||||
}
|
||||
|
||||
const props = defineProps<SpacingProps>()
|
||||
|
||||
let spacingClass: string
|
||||
|
||||
switch (props.size) {
|
||||
case "lg":
|
||||
spacingClass = "space-y-4"
|
||||
break;
|
||||
|
||||
case "md":
|
||||
default:
|
||||
spacingClass = "space-y-2"
|
||||
break;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
:class="cn(spacingClass)"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user