From ac100de8d8e0fc85e34cde9aec6262259b12f96c Mon Sep 17 00:00:00 2001
From: Cristiano Magro <cristiano.magro@vola.it>
Date: Mon, 30 Dec 2024 21:53:48 +0100
Subject: [PATCH] style scoped locali

---
 09 - deeper into components/cmp-adv-01-starting-setup/src/components/BaseBadge.vue |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/09 - deeper into components/cmp-adv-01-starting-setup/src/components/BaseBadge.vue b/09 - deeper into components/cmp-adv-01-starting-setup/src/components/BaseBadge.vue
new file mode 100644
index 0000000..c494bc6
--- /dev/null
+++ b/09 - deeper into components/cmp-adv-01-starting-setup/src/components/BaseBadge.vue
@@ -0,0 +1,37 @@
+<template>
+  <span class="badge" :class="classes">{{ caption }}</span>
+</template>
+
+<script>
+export default {
+  props: ['type', 'caption'],
+  computed: {
+    classes() {
+      return {
+        'badge--admin': this.type === 'admin',
+        'badge--author': this.type === 'author',
+      };
+    },
+  },
+};
+</script>
+
+<style scoped>
+.badge {
+  display: inline-block;
+  padding: 0.5rem 1rem;
+  border-radius: 30px;
+  background-color: #ccc;
+  color: #2e2e2e;
+}
+
+.badge--admin {
+  background-color: #810036;
+  color: white;
+}
+
+.badge--author {
+  background-color: #002c8a;
+  color: white;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.8.0