@coreui/vue
Version:
UI Components Library for Vue.js
36 lines (32 loc) • 911 B
JavaScript
var vue = require('vue');
const CCardImage = vue.defineComponent({
name: 'CCardImage',
props: {
/**
* Component used for the root node. Either a string to use a HTML element or a component.
*/
as: {
type: String,
default: 'img',
},
/**
* Optionally orientate the image to the top, bottom.
*
* @values 'top', 'bottom'
*/
orientation: {
type: String,
validator: (value) => {
return ['top', 'bottom'].includes(value);
},
},
},
setup(props, { slots }) {
return () => vue.h(props.as, {
class: `card-img${props.orientation ? `-${props.orientation}` : ''}`,
}, slots.default && slots.default());
},
});
exports.CCardImage = CCardImage;
//# sourceMappingURL=CCardImage.js.map
;