i18n-keyless-core 1.3.0 → 1.5.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/types.d.ts +0 -21
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
1
|
export type PrimaryLang = "fr" | "en";
|
|
3
2
|
export type Lang = "fr" | "en" | "nl" | "it" | "de" | "es" | "pl" | "pt" | "ro" | "sv" | "tr" | "ja" | "cn" | "ru" | "ko" | "ar";
|
|
4
3
|
export type Translations = Record<string, string>;
|
|
@@ -21,26 +20,6 @@ export interface I18nConfig {
|
|
|
21
20
|
* - POST /translate -- with a body of { key: string }
|
|
22
21
|
*/
|
|
23
22
|
API_URL?: string;
|
|
24
|
-
/**
|
|
25
|
-
* the component should be a React component, such as
|
|
26
|
-
*
|
|
27
|
-
* ```ts
|
|
28
|
-
* export default function MyComponent({ style, className, whatever, children}) {
|
|
29
|
-
* return <Text style={style} className={className} whatever={whatever}>{children}</Text>;
|
|
30
|
-
* }
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* Then i18n-keyless can pass MyComponent's props to i18n-keyless' I18nText
|
|
34
|
-
*
|
|
35
|
-
* ```ts
|
|
36
|
-
* <I18nText style={style} className={className} whatever={whatever}>My text to translate</I18nText>
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* *BE CAREFUL* The component should not be I18nText or a component that uses I18nText to avoid infinite loops during rendering.
|
|
40
|
-
*/
|
|
41
|
-
component?: React.ComponentType<{
|
|
42
|
-
children: string;
|
|
43
|
-
} & Record<string, unknown>>;
|
|
44
23
|
/**
|
|
45
24
|
* The languages config
|
|
46
25
|
*
|