mirror of
https://github.com/rustfs/console.git
synced 2026-09-24 16:30:56 +08:00
- Auto-format all files to comply with Prettier rules - Fix code style issues in 545 files
25 lines
641 B
Vue
25 lines
641 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 :as="as" :as-child="asChild" :class="cn(buttonVariants({ variant, size }), props.class)">
|
|
<slot />
|
|
</Primitive>
|
|
</template>
|