Cristiano Magro
2024-12-30 501f0d04371ebcdd9d9401d9e5b911b75f22ddef
08 - component communication/cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeElement.vue
@@ -2,12 +2,13 @@
  <li>
    <h3>{{ topicName }}</h3>
    <p>{{ description }}</p>
    <button @click="$emit('select-topic', id)">Learn More</button>
    <button @click="selectTopic(id)">Learn More</button>
  </li>
</template>
<script>
export default {
  inject: ['selectTopic'],
  props: ['id', 'topicName', 'description'],
  emits: ['select-topic'],
};