@coreui/vue
Version:
UI Components Library for Vue.js
29 lines (27 loc) • 773 B
JavaScript
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}`);
}
});
},
};
export { vCPlaceholder as default };
//# sourceMappingURL=v-c-placeholder.js.map