Spookie/assets/js/components/tabs/TabContent.vue

35 lines
418 B
Vue

<template lang="html">
<div
v-show="title === selectedTitle"
class="tab-content"
>
<slot/>
</div>
</template>
<script>
import { inject } from 'vue'
export default {
props: {
title: {
type: String,
required: true
}
},
setup() {
const selectedTitle = inject('selectedTitle')
return {
selectedTitle
}
}
}
</script>
<style>
.tab-content {
padding: 20px;
border-radius: 5px;
}
</style>