[UI] Added title propery to EditButton component.

This commit is contained in:
Fabio Manganiello 2024-09-05 01:32:51 +02:00
parent 485a1db3d3
commit b0d9a95331
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -1,7 +1,9 @@
<template> <template>
<button class="edit-btn" <button class="edit-btn"
@click="proxy($event)" @touch="proxy($event)" @input="proxy($event)" :title="title"
> @click="proxy($event)"
@touch="proxy($event)"
@input="proxy($event)">
<i class="fas fa-pen-to-square" /> <i class="fas fa-pen-to-square" />
</button> </button>
</template> </template>
@ -9,6 +11,13 @@
<script> <script>
export default { export default {
emits: ['input', 'click', 'touch'], emits: ['input', 'click', 'touch'],
props: {
title: {
type: String,
default: 'Edit',
},
},
methods: { methods: {
proxy(e) { proxy(e) {
this.$emit(e.type, e) this.$emit(e.type, e)
@ -26,8 +35,8 @@ export default {
border: 1px solid rgba(0, 0, 0, 0); border: 1px solid rgba(0, 0, 0, 0);
&:hover { &:hover {
background: $hover-bg; color: $default-hover-fg;
border: 1px solid $selected-fg; border: none;
} }
} }
</style> </style>