2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 11:29:00 +00:00

fix: Use css to toggle row remove icon

This commit is contained in:
Faris Ansari 2020-05-06 23:03:50 +05:30
parent 4a5b55624f
commit dcfc6891fd

View File

@ -1,21 +1,14 @@
<template>
<Row
:ratio="ratio"
class="border-b px-2 w-full "
:class="{ 'bg-brand-100': hovering }"
@mouseover="hovering = true"
@mouseleave="hovering = false"
@click="hovering = false"
>
<Row :ratio="ratio" class="w-full px-2 border-b hover:bg-brand-100 group">
<div class="flex items-center pl-2 text-gray-600">
<span v-if="hovering">
<span class="hidden group-hover:inline-block">
<feather-icon
name="x"
class="w-4 h-4 -ml-1 cursor-pointer"
@click="$emit('remove')"
/>
</span>
<span v-else>
<span class="group-hover:hidden">
{{ row.idx + 1 }}
</span>
</div>