From eff8adadc4ede165f511efbbd8527561a718f750 Mon Sep 17 00:00:00 2001 From: Abel Toledano Date: Thu, 26 Sep 2024 13:55:49 +0200 Subject: [PATCH] theme config doc --- doc/texts.md | 7 ++++--- doc/theme-config.md | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/texts.md b/doc/texts.md index fe5f4632c2..82db0d99a1 100644 --- a/doc/texts.md +++ b/doc/texts.md @@ -2,7 +2,8 @@ Some components use some default texts that you can customize using [`theme` prop](./theme-config.md) -These are the customizable texts and their default values: +These are some of the customizable texts and their default values in spanish (see the +[full list in the code](../src/text-tokens.tsx)): - `expirationDatePlaceholder`: `'MM/AA'` - `enablePasswordVisibility`: `'Mostrar contraseƱa'`, @@ -49,5 +50,5 @@ You can customize them in your page. For example: ``` -If your application supports multi language, you may need to override all the texts and use localized -translation tokens depending on your user preferred language. +If your application supports multi language, you may need to provide localized translation tokens depending on +your user preferred language. diff --git a/doc/theme-config.md b/doc/theme-config.md index 34cb2089c7..3349e047cf 100644 --- a/doc/theme-config.md +++ b/doc/theme-config.md @@ -16,12 +16,13 @@ type ThemeConfig = { insideNovumNativeApp?: boolean; userAgent?: string; }; - texts?: ThemeTexts; + texts?: Partial; analytics?: { logEvent: (event: TrackingEvent) => Promise; }; Link?: LinkComponent; useHrefDecorator: () => (href: string) => string; + preventCopyInFormFields?: boolean; }; ``` @@ -56,6 +57,8 @@ Here is a description of every attribute: - `useHrefDecorator`: it is a React hook that a function that takes a `href` and returns a new `href`. This is useful to automatically add parameters to the `href` being used in Touchable components (for example, to add a `utm_source` parameter to the `href`). +- `preventCopyInFormFields?`: this is used as the default value for `preventCopy` prop in form fields. `false` + by default. ## LinkComponent