mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
10 lines
320 B
TypeScript
10 lines
320 B
TypeScript
|
import {BindableValue, dom} from 'grainjs';
|
||
|
|
||
|
/**
|
||
|
* Version of makeTestId that can be appended conditionally.
|
||
|
* TODO: update grainjs typings, as this is already supported there.
|
||
|
*/
|
||
|
export function makeTestId(prefix: string) {
|
||
|
return (id: string, obs?: BindableValue<boolean>) => dom.cls(prefix + id, obs ?? true);
|
||
|
}
|