mirror of
https://github.com/coollabsio/coolify-examples.git
synced 2026-03-02 19:28:57 +00:00
laravel inertia
This commit is contained in:
22
laravel-inertia/resources/js/components/ui/button/Button.vue
Normal file
22
laravel-inertia/resources/js/components/ui/button/Button.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Primitive, type PrimitiveProps } from 'radix-vue';
|
||||
import type { HTMLAttributes } from 'vue';
|
||||
import { buttonVariants, type 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 :as="as" :as-child="asChild" :class="cn(buttonVariants({ variant, size }), props.class)">
|
||||
<slot />
|
||||
</Primitive>
|
||||
</template>
|
||||
Reference in New Issue
Block a user