<template>
  <div class="button" :class="{ disabled }" @click="click">
    <slot />
  </div>
</template>

<script>
export default {
  props: ['disabled'],
  methods: {
    click() {
      this.$emit('click')
    },
  },
}
</script>

<style lang="scss">
@import '~/assets/css/components';

.button {
  display: inline-block;
  margin: auto;
  padding: 4px 24px;
  border: 4px solid $button-border-color;
  border-radius: 8px;
  background-color: $button-background-color;
  color: $button-text-color;
  text-align: center;
  font-family: $secondary-font;
  font-weight: bold;
  font-size: 24px;
  cursor: pointer;

  &:hover {
    border-color: $button-hover-border-color;
    background-color: $button-hover-background-color;
    color: $button-hover-text-color;
  }

  &.disabled,
  &:hover.disabled {
    cursor: default;
    background-color: $button-disabled-background-color;
    border-color: $button-disabled-border-color;
    color: $button-disabled-text-color;
  }
}
</style>
