SubmitButton.vue 435 Bytes
Newer Older
Anton's avatar
Anton committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<template lang="pug">
  q-btn(:dark="true", outline, icon-right="forward", :color="active ? 'primary' : 'light'",
    @click="clickHandler", type="submit", :disabled="!active")
    slot
</template>

<script>
  export default {
    props: ['active', 'click'],
    methods: {
      clickHandler (...args) {
        if (typeof this.click === 'function') {
          this.click(args)
        }
      }
    }
  }
</script>

<style></style>