<template>
  <div v-if="active" class="s-tab-pane">
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: 's-tab-pane',
  props: {
    name: {
      type: String,
      required: true
    }
  },
  inject: ['data'],
  computed: {
    active () {
      return this.data.tabName === this.name
    }
  }
}
</script>
