feat: initial commit

This commit is contained in:
Eric Liu 2019-12-15 11:20:52 -08:00
commit 72dc38ea56
119 changed files with 14925 additions and 1 deletions

19
src/lib/cx.js Normal file
View file

@ -0,0 +1,19 @@
const prefix = 'bx';
function cx(...items) {
const classes = [];
items.forEach(item => {
if (typeof item === 'string') {
if (item.slice(0, 2) === '--') {
classes.push(`${prefix}${item}`);
} else {
classes.push(item);
}
}
});
return classes.join(' ');
}
export { cx };

1
src/lib/index.js Normal file
View file

@ -0,0 +1 @@
export { cx } from './cx';