Skip to content

Commit

Permalink
feat: add style-utils file to base project
Browse files Browse the repository at this point in the history
  • Loading branch information
onlyexeption committed Jan 17, 2024
1 parent 147b26d commit 0b46a87
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default function combine (styles: any, classes: string) {
let combinedClasses = '';
const keys = classes.split(' ');

for (let i = 0; i < keys.length; i++) {
const arg = styles[keys[i]];
if (arg) {
combinedClasses += ' ' + arg;
} else {
combinedClasses += ' ' + keys[i];
}
}

return combinedClasses;
}

0 comments on commit 0b46a87

Please sign in to comment.