UNPKG

@coreui/vue

Version:

UI Components Library for Vue.js

49 lines (45 loc) 1.23 kB
'use strict'; var vue = require('vue'); const CImage = vue.defineComponent({ name: 'CImage', props: { /** * Set the horizontal aligment. * * @values 'start', 'center', 'end' */ align: { type: String, validator: (value) => { return ['start', 'center', 'end'].includes(value); }, }, /** * Make image responsive. */ fluid: Boolean, /** * Make image rounded. */ rounded: Boolean, /** * Give an image a rounded 1px border appearance. */ thumbnail: Boolean, }, setup(props) { return () => vue.h('img', { class: [ { [`float-${props.align}`]: props.align && (props.align === 'start' || props.align === 'end'), 'd-block mx-auto': props.align && props.align === 'center', 'img-fluid': props.fluid, rounded: props.rounded, 'img-thumbnail': props.thumbnail, }, ], }); }, }); exports.CImage = CImage; //# sourceMappingURL=CImage.js.map