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

8 lines
204 B
TypeScript

export type Classname = [string, boolean?];
export const classnames = (...classnames: Classname[]) =>
classnames
.filter(([, visible = true]) => visible)
.map(([name]) => name)
.join(" ");