Jonathan Druart
60f0aee9b6
Our toolbar component is not flexible enough, we cannot: * have something else than a router-link * have a link outside of the app (it needs to be a Vue route) This patch adds a ToolbarButton component that is used for existing button. But other buttons can be added without being a router-link. Test plan: No change in behaviour here! Test the buttons in the 4 existing toolbar (in the ERM module) Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
27 lines
522 B
Vue
27 lines
522 B
Vue
<template>
|
|
<router-link :to="to" :class="class"
|
|
><font-awesome-icon v-if="icon" :icon="icon" /> {{ title }}</router-link
|
|
>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
to: {
|
|
type: [String, Object],
|
|
},
|
|
class: {
|
|
type: String,
|
|
default: "btn btn-default",
|
|
},
|
|
icon: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
title: {
|
|
type: String,
|
|
},
|
|
},
|
|
name: "Toolbar",
|
|
}
|
|
</script>
|