14 lines
210 B
JavaScript
14 lines
210 B
JavaScript
export function prefixClasses(prefix, classes) {
|
|
if (String(classes).length < 1) {
|
|
return '';
|
|
}
|
|
|
|
return classes.split(' ')
|
|
.map(c => `${prefix}-${c}`)
|
|
.join(' ');
|
|
}
|
|
|
|
export default {
|
|
prefixClasses
|
|
};
|