chore: upgrade eslint and prettier (#2376)
* chore: upgrade eslint and prettier * chore: add restrict-template-expressions
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
export const classNames = (...values: any[]): string => {
|
||||
return values.map((value) => (typeof value === 'string' ? value : null)).join(' ')
|
||||
import { isNotUndefined } from './Utils'
|
||||
|
||||
export const classNames = (...values: (string | null | undefined | boolean)[]): string => {
|
||||
return values
|
||||
.map((value) => (typeof value === 'string' ? value : null))
|
||||
.filter(isNotUndefined)
|
||||
.join(' ')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user