Skip to content

Commit

Permalink
IBX-5429: Fixed empty spaces when creating classes (#782)
Browse files Browse the repository at this point in the history
* IBX-5429: Fixed empty spaces when creating classes

* prettier
  • Loading branch information
Gengar-i authored May 24, 2023
1 parent 942d067 commit eb1d760
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ export const createCssClassNames = (classes) => {

return Object.entries(classes)
.reduce((total, [name, condition]) => {
return `${total} ${condition ? name : ''}`;
if (condition) {
return `${total} ${name}`;
}

return total;
}, '')
.trim();
};

0 comments on commit eb1d760

Please sign in to comment.