forked from phc/orario
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
248 B
React
8 lines
248 B
React
2 years ago
|
export const withClasses = classes =>
|
||
|
Array.isArray(classes)
|
||
|
? classes.filter(e => !!e).join(' ')
|
||
|
: Object.entries(classes)
|
||
|
.filter(([, value]) => value)
|
||
|
.map(([key]) => key)
|
||
|
.join(' ')
|