@hairy/react-i18-lib 1.45.0 → 1.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +9 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,15 @@ interface TransProps {
|
|
|
4
4
|
i18nKey: string;
|
|
5
5
|
[key: string]: ReactNode;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Translate a string to a React node
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <Trans i18nKey="hello" />
|
|
12
|
+
* <Trans i18nKey="hello" name="John" />
|
|
13
|
+
* <Trans i18nKey="hello" name="John" age={20} />
|
|
14
|
+
* <Trans i18nKey="hello" name="John" age={<span>20</span>} />
|
|
15
|
+
*/
|
|
7
16
|
declare function Trans({ i18nKey, ...additionalProps }: TransProps): ReactNode[];
|
|
8
17
|
|
|
9
18
|
export { Trans, type TransProps };
|