mirror of
https://github.com/rustfs/console.git
synced 2026-11-02 13:42:10 +08:00
- Auto-format all files to comply with Prettier rules - Fix code style issues in 545 files
35 lines
849 B
Vue
35 lines
849 B
Vue
<script setup lang="ts">
|
|
import type { PrimitiveProps } from 'reka-ui'
|
|
import type { HTMLAttributes } from 'vue'
|
|
import type { ButtonGroupVariants } from '.'
|
|
import { Primitive } from 'reka-ui'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
interface Props extends PrimitiveProps {
|
|
class?: HTMLAttributes['class']
|
|
orientation?: ButtonGroupVariants['orientation']
|
|
}
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
as: 'div',
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<Primitive
|
|
role="group"
|
|
data-slot="button-group"
|
|
:data-orientation="props.orientation"
|
|
:as="as"
|
|
:as-child="asChild"
|
|
:class="
|
|
cn(
|
|
'bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*=\'size-\'])]:size-4',
|
|
props.class
|
|
)
|
|
"
|
|
>
|
|
<slot />
|
|
</Primitive>
|
|
</template>
|