@coreui/vue
Version:
UI Components Library for Vue.js
45 lines (41 loc) • 1.75 kB
JavaScript
'use strict';
var vue = require('vue');
var props = require('../../props.js');
const CCard = vue.defineComponent({
name: 'CCard',
props: {
/**
* Sets the color context of the component to one of CoreUI’s themed colors.
*
* @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
*/
color: props.Color,
/**
* Sets the component's color scheme to one of CoreUI's themed colors, ensuring the text color contrast adheres to the WCAG 4.5:1 contrast ratio standard for accessibility.
*
* @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
* @since 5.0.0
*/
textBgColor: props.Color,
/**
* Sets the text color context of the component to one of CoreUI’s themed colors.
*
* @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', 'primary-emphasis', 'secondary-emphasis', 'success-emphasis', 'danger-emphasis', 'warning-emphasis', 'info-emphasis', 'light-emphasis', 'body', 'body-emphasis', 'body-secondary', 'body-tertiary', 'black', 'black-50', 'white', 'white-50'
*/
textColor: props.TextColor,
},
setup(props, { slots }) {
return () => vue.h('div', {
class: [
'card',
{
[`bg-${props.color}`]: props.color,
[`text-${props.textColor}`]: props.textColor,
[`text-bg-${props.textBgColor}`]: props.textBgColor,
},
],
}, slots.default && slots.default());
},
});
exports.CCard = CCard;
//# sourceMappingURL=CCard.js.map