Skip to content

Commit

Permalink
theme config doc
Browse files Browse the repository at this point in the history
  • Loading branch information
atabel committed Sep 26, 2024
1 parent bf58a01 commit eff8ada
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions doc/texts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'`,
Expand Down Expand Up @@ -49,5 +50,5 @@ You can customize them in your page. For example:
</ThemeContextProvider>
```

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.
5 changes: 4 additions & 1 deletion doc/theme-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ type ThemeConfig = {
insideNovumNativeApp?: boolean;
userAgent?: string;
};
texts?: ThemeTexts;
texts?: Partial<Dictionary>;
analytics?: {
logEvent: (event: TrackingEvent) => Promise<void>;
};
Link?: LinkComponent;
useHrefDecorator: () => (href: string) => string;
preventCopyInFormFields?: boolean;
};
```

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit eff8ada

Please sign in to comment.