adrema/resources/js/components/page/ToolbarButton.vue

29 lines
749 B
Vue
Raw Normal View History

2023-05-02 23:13:00 +02:00
<template>
2023-05-20 02:38:38 +02:00
<i-link :href="href" v-on="$listeners" class="btn label" :class="colors[color]" v-tooltip="menuStore.tooltipsVisible ? $slots.default[0].text : ''">
2023-05-02 23:13:00 +02:00
<svg-sprite v-show="icon" class="w-3 h-3 xl:mr-2" :src="icon"></svg-sprite>
<span class="hidden xl:inline"><slot></slot></span>
</i-link>
</template>
<script>
import {menuStore} from '../../stores/menuStore.js';
export default {
data: function () {
return {
menuStore: menuStore(),
2023-05-02 23:57:20 +02:00
colors: {
primary: 'btn-primary',
warning: 'btn-warning',
info: 'btn-info',
},
2023-05-02 23:13:00 +02:00
};
},
props: {
href: {},
icon: {},
color: {},
},
};
</script>