Hide mouse buttons using visibility: hidden
This commit is contained in:
parent
7a58ac37f7
commit
4b6732ccd0
2 changed files with 11 additions and 10 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
const { visible, inverted = false } = defineProps<{
|
||||
visible: boolean;
|
||||
inverted?: boolean;
|
||||
}>();
|
||||
</script>
|
||||
|
|
@ -7,11 +8,11 @@ const props = defineProps<{
|
|||
<template>
|
||||
<div
|
||||
class="flex select-none items-center rounded-sm border p-0.5 transition hover:bg-neutral-200 active:scale-95"
|
||||
:class="
|
||||
props.inverted
|
||||
? 'border-black bg-black text-white hover:bg-neutral-600'
|
||||
: 'bg-white text-black'
|
||||
"
|
||||
:class="{
|
||||
'bg-white text-black': !inverted,
|
||||
'border-black bg-black text-white hover:bg-neutral-600': inverted,
|
||||
hidden: !visible,
|
||||
}"
|
||||
>
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue