Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.forEach((modifierName) => {
const modifier = modifierName + capitalizeFirst(breakpoint);
describe(modifier, () => {
it('should be defined', () => {
expect(wrapper.vm[modifier]).toBeDefined();
expect(wrapper.vm[modifier]).toEqual(false);
});
});
});
});
['offset', 'push', 'pull'].forEach((modifierName) => {
const modifier = modifierName + capitalizeFirst(breakpoint);
describe(modifier, () => {
it('should be defined', () => {
expect(wrapper.vm[modifier]).toBeDefined();
expect(wrapper.vm[modifier]).toEqual('');
});
});
});
});
import { breakpoints } from '@inkline/inkline/src/constants';
import { breakpointClass, capitalizeFirst, modifierClass } from '@inkline/inkline/src/helpers';
const properties = {};
for (let breakpoint of breakpoints) {
for (let property of ['start', 'center', 'end', 'top', 'middle', 'bottom', 'around', 'between', 'reverse']) {
properties[property + capitalizeFirst(breakpoint)] = {
type: Boolean,
default: false
};
}
}
export default {
name: 'IRow',
props: {
noGutter: {
type: Boolean,
default: false
},
noCollapse: {
type: Boolean,
default: false
import { breakpointKeys } from '@inkline/inkline/src/constants';
import { breakpointClass, capitalizeFirst, modifierClass } from '@inkline/inkline/src/helpers';
const properties = {};
for (let breakpoint of breakpointKeys) {
for (let property of ['start', 'center', 'end', 'top', 'middle', 'bottom', 'around', 'between', 'reverse']) {
properties[property + capitalizeFirst(breakpoint)] = {
type: Boolean,
default: false
};
}
}
export default {
name: 'IRow',
props: {
noGutter: {
type: Boolean,
default: false
},
noCollapse: {
type: Boolean,
default: false
if (breakpoint !== '') {
properties[breakpoint] = {
type: [String, Boolean, Number],
default: false
};
}
for (let property of ['first', 'last']) {
properties[property + capitalizeFirst(breakpoint)] = {
type: Boolean,
default: false
};
}
for (let property of ['offset', 'push', 'pull']) {
properties[property + capitalizeFirst(breakpoint)] = {
type: [String, Number],
default: ''
};
}
}
export default {
name: 'IColumn',
props: properties,
computed: {
classes() {
return [
...Object.keys(properties)
.map((p) => this[p] ? breakpointClass(modifierClass(p), this[p]) : '')
].filter((p) => p !== '');
}
import { breakpoints } from '@inkline/inkline/src/constants';
import { breakpointClass, capitalizeFirst, modifierClass } from '@inkline/inkline/src/helpers';
const properties = {};
for (let breakpoint of breakpoints) {
if (breakpoint !== '') {
properties[breakpoint] = {
type: [String, Boolean, Number],
default: false
};
}
for (let property of ['first', 'last']) {
properties[property + capitalizeFirst(breakpoint)] = {
type: Boolean,
default: false
};
}
for (let property of ['offset', 'push', 'pull']) {
properties[property + capitalizeFirst(breakpoint)] = {
type: [String, Number],
default: ''
};
}
}
export default {
name: 'IColumn',
props: properties,