1681-engine / react / classJoiner
Function: classJoiner() ​
ts
function classJoiner(classes): ClassJoiner;Defined in: src/react/classNames.ts:14
A joiner that hangs a game's own class names beside the kit's: every name it is given (split on spaces) is kept, and followed by classes[name without the kit's prefix] when the game mapped it. Pure, so it is tested under node.
ts
classJoiner({ tabs: 'tabs', button: 'btn', picked: 'active' })('e1681-button small', 'picked') // 'e1681-button btn small picked active'Parameters ​
| Parameter | Type |
|---|---|
classes | Readonly<Record<string, string>> |