<template>
  <div @click="toggleClick">
    <i
      :class="[{'is-active':isActive}, 'hamburger iconfont icon-shouqi']"
    />
  </div>
</template>

<script>
export default {
  name: 'Hamburger',
  props: {
    isActive: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    toggleClick() {
      this.$emit('toggleClick')
    }
  }
}
</script>

<style lang="scss" scoped>
@mixin hamburger-icon{
  [data-theme="dark"] & {
    color: #fff;
  }
}

.hamburger {
  display: inline-block;
  vertical-align: middle;
  font-size: 10px;
  transform: rotate(-180deg);
  @include hamburger-icon;
}

.hamburger.is-active {
  transform: rotate(0);
}
</style>
