Changing domT to a default translation function for browser

This commit is contained in:
Jarosław Sadziński
2022-10-19 20:44:56 +02:00
parent 2586b595a5
commit 2f29df1b17
6 changed files with 58 additions and 23 deletions

View File

@@ -3,7 +3,7 @@ import {icon} from 'app/client/ui2018/icons';
import {dom, DomElementArg, Observable, styled} from "grainjs";
import {t} from 'app/client/lib/localization';
const translate = (x: string, args?: any): string => t(`AddNewButton.${x}`, args);
const translate = (x: string, args?: any) => t(`AddNewButton.${x}`, args);
export function addNewButton(isOpen: Observable<boolean> | boolean = true, ...args: DomElementArg[]) {
return cssAddNewButton(