codex-marketplace-ui-compon.../utils/classnames.ts

8 lines
204 B
TypeScript
Raw Normal View History

2024-08-20 13:57:58 +00:00
export type Classname = [string, boolean?];
export const classnames = (...classnames: Classname[]) =>
classnames
.filter(([, visible = true]) => visible)
.map(([name]) => name)
.join(" ");