mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 16:22:16 +01:00
26 lines
645 B
Vue
26 lines
645 B
Vue
<script setup lang="ts">
|
|
import type { HTMLAttributes } from 'vue';
|
|
import { cn } from '@/lib/utils';
|
|
import { Primitive, type PrimitiveProps } from 'reka-ui';
|
|
import { type ButtonVariants, 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>
|