@inkline/inkline
Version:
Inkline is the Vue.js UI/UX Library built for creating your next design system
43 lines • 1.16 kB
JavaScript
import { defineComponent } from 'vue';
import { colorVariantClass, defaultPropValue, sizePropValidator } from '../../mixins/index.mjs';
/**
* Slot for default badge content
* @name default
* @kind slot
*/
const componentName = 'IBadge';
export default defineComponent({
name: componentName,
props: {
/**
* The color variant of the badge
* @type primary | success | light | dark | info | success | warning | danger
* @default light
* @name color
*/
color: {
type: String,
default: defaultPropValue(componentName, 'color')
},
/**
* The size variant of the badge
* @type sm | md | lg
* @default md
* @name size
*/
size: {
type: String,
default: defaultPropValue(componentName, 'size'),
validator: sizePropValidator
}
},
computed: {
classes() {
return {
...colorVariantClass(this),
[`-${this.size}`]: Boolean(this.size)
};
}
}
});
//# sourceMappingURL=script.mjs.map