@coreui/vue
Version:
UI Components Library for Vue.js
51 lines (47 loc) • 1.41 kB
JavaScript
var vue = require('vue');
var props = require('../../props.js');
const CTableDataCell = vue.defineComponent({
name: 'CTableDataCell',
props: {
/**
* Highlight a table row or cell.
*/
active: Boolean,
/**
* Set the vertical aligment.
*
* @values 'bottom', 'middle', 'top'
*/
align: {
type: String,
validator: (value) => {
return ['bottom', 'middle', 'top'].includes(value);
},
},
/**
* Sets the color context of the component to one of CoreUI’s themed colors.
*
* @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', string
*/
color: props.Color,
/**
* @ignore
*/
scope: String,
},
setup(props, { slots }) {
return () => vue.h(props.scope ? 'th' : 'td', {
class: [
{
[`align-${props.align}`]: props.align,
'table-active': props.active,
[`table-${props.color}`]: props.color,
},
],
...(props.scope && { scope: props.scope }),
}, slots.default && slots.default());
},
});
exports.CTableDataCell = CTableDataCell;
//# sourceMappingURL=CTableDataCell.js.map
;