fix: align status actions (#143)
This commit is contained in:
parent
509ff9e016
commit
e2000321c5
2 changed files with 28 additions and 23 deletions
|
@ -1,6 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
text?: string | number
|
||||
content: string
|
||||
color: string
|
||||
icon: string
|
||||
activeIcon?: string
|
||||
|
@ -18,16 +19,18 @@ defineOptions({
|
|||
|
||||
<template>
|
||||
<component
|
||||
:is="as || 'button'"
|
||||
:is="as || 'button'" w-fit
|
||||
flex gap-1 items-center rounded group
|
||||
:hover="`op100 ${hover}`" focus:outline-none :focus-visible="`op100 ${hover}`"
|
||||
:class="active ? [color, 'op100'] : 'op50'"
|
||||
:hover="hover" focus:outline-none :focus-visible="hover"
|
||||
:class="active ? [color] : 'text-secondary'"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<div rounded-full p2 :group-hover="groupHover" :group-focus-visible="groupHover" group-focus-visible:ring="2 current">
|
||||
<div :class="[active && activeIcon ? activeIcon : icon, { 'pointer-events-none': disabled }]" />
|
||||
</div>
|
||||
<CommonTooltip placement="bottom" :content="content">
|
||||
<div rounded-full p2 :group-hover="groupHover" :group-focus-visible="groupHover" group-focus-visible:ring="2 current">
|
||||
<div :class="[active && activeIcon ? activeIcon : icon, { 'pointer-events-none': disabled }]" />
|
||||
</div>
|
||||
</CommonTooltip>
|
||||
|
||||
<span v-if="text">{{ text }}</span>
|
||||
<span v-if="text" :class="active ? [color] : 'text-secondary-light'" text-sm>{{ text }}</span>
|
||||
</component>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue