<template>
  <button class="button">
    <span class="icon-text">
      <span v-if="icon !== undefined" class="icon">
        <font-awesome-icon :icon="icon" />
      </span>
      <span><slot name="default" /></span>
    </span>
  </button>
</template>

<script lang="ts">
import { Options, Vue } from "vue-class-component";

@Options({
  props: {
    icon: {
      type: String,
      required: false,
    },
  },
})
export default class extends Vue {
  public icon?: string;
}
</script>

<style scoped></style>
