mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-11-03 13:33:21 +00:00
feat(pages): home page base
This commit is contained in:
26
packages/app/src/modules/ui/components/button/Button.vue
Normal file
26
packages/app/src/modules/ui/components/button/Button.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from 'vue';
|
||||
import { cn } from '@/src/modules/shared/style/cn';
|
||||
import { Primitive, type PrimitiveProps } from 'radix-vue';
|
||||
import { type ButtonVariants, buttonVariants } from '.';
|
||||
|
||||
type Props = {
|
||||
variant?: ButtonVariants['variant'];
|
||||
size?: ButtonVariants['size'];
|
||||
class?: HTMLAttributes['class'];
|
||||
} & PrimitiveProps;
|
||||
|
||||
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