glowing-fiesta-original/app/components/ui/button/Button.vue
Liviu Burcusel 0cec9f5afd
All checks were successful
Production Build and Deploy / Build (push) Successful in 52s
Production Build and Deploy / Deploy (push) Successful in 19s
[Closes #1] [Closes !5] Migrated from PrimeVue to shadcn
2025-12-22 16:20:35 +01:00

24 lines
670 B
Vue

<script setup lang="ts">
import type { PrimitiveProps } from "reka-ui";
import type { HTMLAttributes } from "vue";
import type { ButtonVariants } from ".";
import { Primitive } from "reka-ui";
import { cn } from "@/lib/utils";
import { buttonVariants } from ".";
interface Props extends PrimitiveProps {
variant?: ButtonVariants["variant"];
size?: ButtonVariants["size"];
class?: HTMLAttributes["class"];
}
const props = withDefaults(defineProps<Props>(), {
as: "button",
});
</script>
<template>
<Primitive data-slot="button" :as="as" :as-child="asChild" :class="cn(buttonVariants({ variant, size }), props.class)">
<slot />
</Primitive>
</template>