Files
chatwoot/app/javascript/dashboard/components/widgets/BackButton.vue
GitStart f6e0453bb2 fix vertical overflow scroll on BackButton (#6914)
* fix: vertical overflow scroll on BackButton

Co-authored-by: raph941 <45232708+raph941@users.noreply.github.com>

* chore: adds suggested improvement to handle RTS view

Co-authored-by: raph941 <45232708+raph941@users.noreply.github.com>

---------

Co-authored-by: raph941 <45232708+raph941@users.noreply.github.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2023-04-24 22:57:58 +05:30

32 lines
585 B
Vue

<template>
<button class="header-section back-button" @click.capture="goBack">
<fluent-icon icon="chevron-left" />
{{ buttonLabel || $t('GENERAL_SETTINGS.BACK') }}
</button>
</template>
<script>
import router from '../../routes/index';
export default {
props: {
backUrl: {
type: [String, Object],
default: '',
},
buttonLabel: {
type: String,
default: '',
},
},
methods: {
goBack() {
if (this.backUrl !== '') {
router.push(this.backUrl);
} else {
router.go(-1);
}
},
},
};
</script>