2019-10-29 07:20:54 +00:00
|
|
|
<template>
|
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
:disabled="disabled"
|
2019-11-09 11:42:31 +00:00
|
|
|
class="send-button"
|
2019-10-29 07:20:54 +00:00
|
|
|
@click="onClick"
|
|
|
|
>
|
|
|
|
<span v-if="!loading" class="icon-holder">
|
|
|
|
<img src="~widget/assets/images/message-send.svg" />
|
|
|
|
</span>
|
|
|
|
<spinner v-else size="small" />
|
|
|
|
</button>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-12-11 15:27:06 +00:00
|
|
|
import Spinner from 'shared/components/Spinner.vue';
|
2019-10-29 07:20:54 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Spinner,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
loading: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
disabled: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
onClick: {
|
|
|
|
type: Function,
|
|
|
|
default: () => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
|
|
<style scoped lang="scss">
|
|
|
|
@import '~widget/assets/scss/variables.scss';
|
|
|
|
|
|
|
|
.send-button {
|
2019-11-09 11:42:31 +00:00
|
|
|
background: transparent;
|
|
|
|
border: 0;
|
|
|
|
cursor: pointer;
|
2019-10-29 07:20:54 +00:00
|
|
|
position: relative;
|
|
|
|
|
|
|
|
.icon-holder {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
fill: $color-white;
|
|
|
|
font-weight: $font-weight-medium;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|