inicios del FrontEnd
This commit is contained in:
34
APP/components/Badge.vue
Normal file
34
APP/components/Badge.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<template>
|
||||
<component :is="tag" class="badge" :class="`badge-${type}`">
|
||||
<slot></slot>
|
||||
</component>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'badge',
|
||||
props: {
|
||||
tag: {
|
||||
type: String,
|
||||
default: 'span',
|
||||
description: 'Badge tag'
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'default',
|
||||
validator: value => {
|
||||
let acceptedValues = [
|
||||
'primary',
|
||||
'info',
|
||||
'success',
|
||||
'warning',
|
||||
'danger',
|
||||
'default'
|
||||
];
|
||||
return acceptedValues.indexOf(value) !== -1;
|
||||
},
|
||||
description: 'Badge type (primary|info|success|warning|danger|default)'
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style></style>
|
||||
Reference in New Issue
Block a user