Files
mixtape/zero.Web/App/Components/Buttons/icon-button.vue
T

50 lines
891 B
Vue
Raw Normal View History

2020-04-07 00:11:35 +02:00
<template>
2020-04-10 18:36:56 +02:00
<button type="button" class="ui-icon-button" :disabled="disabled" :class="'type-' + type" @click="tryClick" :title="title | localize">
2020-04-07 00:11:35 +02:00
<span class="sr-only" v-localize="title"></span>
2020-04-09 15:53:03 +02:00
<i class="ui-button-icon" :class="icon"></i>
2020-04-07 00:11:35 +02:00
</button>
</template>
<script>
export default {
name: 'uiIconButton',
props: {
state: {
type: String,
default: 'default'
},
icon: {
type: String,
default: 'fth-arrow-left'
},
2020-04-10 18:36:56 +02:00
type: {
type: String,
default: 'action'
},
2020-04-07 00:11:35 +02:00
title: {
type: String,
default: '@ui.back'
},
disabled: Boolean,
click: {
type: Function,
default: () => { }
}
},
mounted ()
{
},
methods: {
2020-04-10 18:36:56 +02:00
tryClick(ev)
{
this.$emit('click', ev);
}
2020-04-07 00:11:35 +02:00
}
}
</script>