juggl/src/components/base/BaseColorText.vue

33 lines
524 B
Vue
Raw Normal View History

2021-01-08 00:01:42 +01:00
<template>
<span class="box" :style="customStyle">{{ text }}</span>
</template>
<script>
export default {
name: "BaseColorText",
props: {
text: {
required: true,
type: String
},
color: {
required: false,
type: String,
default: "transparent"
}
},
computed: {
customStyle: function() {
return "background-color: " + this.color;
}
}
};
</script>
<style lang="sass" scoped>
.box
border-radius: 5px
padding: 3px 10px
text-align: left
</style>