@coreui/vue
Version:
UI Components Library for Vue.js
33 lines (29 loc) • 848 B
JavaScript
Object.defineProperty(exports, '__esModule', { value: true });
const BREAKPOINTS = [
'xxl',
'xl',
'lg',
'md',
'sm',
'xs',
];
var vCPlaceholder = {
name: 'c-placeholder',
mounted(el, binding) {
const value = binding.value;
el.classList.add(value.animation ? `placeholder-${value.animation}` : 'placeholder');
BREAKPOINTS.forEach((bp) => {
const breakpoint = value[bp];
const infix = bp === 'xs' ? '' : `-${bp}`;
if (typeof breakpoint === 'number') {
el.classList.add(`col${infix}-${breakpoint}`);
}
if (typeof breakpoint === 'boolean') {
el.classList.add(`col${infix}`);
}
});
},
};
exports.default = vCPlaceholder;
//# sourceMappingURL=v-c-placeholder.js.map
;