mirror of
https://github.com/elk-zone/elk.git
synced 2025-05-11 01:27:46 +03:00
feat: more actions in status card
This commit is contained in:
parent
2422c809e0
commit
e9c9ecefc8
7 changed files with 157 additions and 87 deletions
components/status
|
@ -3,8 +3,7 @@ defineProps<{
|
|||
text?: string | number
|
||||
color: string
|
||||
icon: string
|
||||
activeIcon: string
|
||||
tooltip: string
|
||||
activeIcon?: string
|
||||
hover: string
|
||||
groupHover: string
|
||||
active?: boolean
|
||||
|
@ -17,21 +16,15 @@ defineOptions({
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<CommonTooltip placement="bottom">
|
||||
<button
|
||||
flex gap-1 items-center rounded :hover="`op100 ${hover}`" group
|
||||
:class="active ? [color, 'op100'] : 'op50'"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<div rounded-full p2 :group-hover="groupHover">
|
||||
<div :class="[active && activeIcon ? activeIcon : icon, { 'pointer-events-none': disabled }]" />
|
||||
</div>
|
||||
<button
|
||||
flex gap-1 items-center rounded :hover="`op100 ${hover}`" group
|
||||
:class="active ? [color, 'op100'] : 'op50'"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<div rounded-full p2 :group-hover="groupHover">
|
||||
<div :class="[active && activeIcon ? activeIcon : icon, { 'pointer-events-none': disabled }]" />
|
||||
</div>
|
||||
|
||||
<span v-if="text">{{ text }}</span>
|
||||
</button>
|
||||
|
||||
<template #popper>
|
||||
{{ tooltip }}
|
||||
</template>
|
||||
</CommonTooltip>
|
||||
<span v-if="text">{{ text }}</span>
|
||||
</button>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue