This repository has been archived on 2021-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
vuejs_course/2021-05-05_vuex-11-a-challe.../src/components/ui/BaseBadge.vue

36 lines
534 B
Vue

<template>
<span class="badge" :class="['badge--' + mode, {nml: noMarginLeft}]">
<slot></slot>
</span>
</template>
<script>
export default {
props: ['mode', 'noMarginLeft']
}
</script>
<style scoped>
.badge {
display: inline-block;
padding: 0.15rem 1.25rem;
background-color: #ccc;
color: #292929;
margin: 0 0.75rem;
border-radius: 30px;
}
.nml {
margin-left: 0;
}
.badge--highlight {
background-color: #f0b800;
color: black;
}
.badge--elegant {
background-color: #45006d;
color: white;
}
</style>