Cristiano Magro
2025-01-07 0ff501d4aa28b64a11a3d9a6101e3f997a9e9795
10 - course project/xno-prj-cmp-01-starting-setup/src/components/learning-resource/LearningResource.vue
@@ -1,22 +1,25 @@
<template>
    <li>
        <div>
            <header>
                <h3>{{ title }}</h3>
                <button>Delete</button>
            </header>
        </div>
        <p>{{ description }}</p>
        <nav>
            <a :href="link">View Resource</a>
        </nav>
    </li>
  <li>
    <base-card>
      <header>
        <h3>{{ title }}</h3>
        <base-button mode="flat" @click="deleteResource(id)"
          >Delete</base-button
        >
      </header>
      <p>{{ description }}</p>
      <nav>
        <a :href="link">View Resource</a>
      </nav>
    </base-card>
  </li>
</template>
<script>
export default {
    props: ['title', 'description', 'link']
}
  props: ['id', 'title', 'description', 'link'],
  inject: ['deleteResource'],
};
</script>
<style scoped>
@@ -49,4 +52,4 @@
a:active {
  color: #c89300;
}
</style>
</style>