@hairy/react-i18-lib 1.44.0 → 1.46.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +9 -0
  2. 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 };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hairy/react-i18-lib",
3
3
  "type": "module",
4
- "version": "1.44.0",
4
+ "version": "1.46.0",
5
5
  "description": "Library for react",
6
6
  "author": "Hairyf <wwu710632@gmail.com>",
7
7
  "license": "MIT",