@woovi/ui 6.3.4 → 6.3.6
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/README.md +46 -4
- package/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/dist/llms.txt +1474 -0
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -15,13 +15,55 @@ pnpm add @woovi/ui
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
17
17
|
```tsx
|
|
18
|
-
import
|
|
18
|
+
import i18n from "i18next"
|
|
19
|
+
|
|
20
|
+
import { Button, Card, ThemeProvider } from "@woovi/ui";
|
|
21
|
+
import { SnackbarProvider } from "notistack"
|
|
22
|
+
import { I18nextProvider, initReactI18next } from "react-i18next"
|
|
23
|
+
import { BrowserRouter } from "react-router-dom"
|
|
24
|
+
|
|
25
|
+
import en from '@woovi/ui/locales/en.json';
|
|
26
|
+
import es from '@woovi/ui/locales/es.json';
|
|
27
|
+
import ptBR from '@woovi/ui/locales/pt-BR.json';
|
|
28
|
+
|
|
29
|
+
i18n.use(initReactI18next).init({
|
|
30
|
+
resources: {
|
|
31
|
+
en: {
|
|
32
|
+
translation: en,
|
|
33
|
+
},
|
|
34
|
+
es: {
|
|
35
|
+
translation: es,
|
|
36
|
+
},
|
|
37
|
+
"pt-BR": {
|
|
38
|
+
translation: ptBR,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
lng: "en",
|
|
42
|
+
fallbackLng: "en",
|
|
43
|
+
interpolation: {
|
|
44
|
+
escapeValue: false,
|
|
45
|
+
},
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
function Providers() {
|
|
49
|
+
return (
|
|
50
|
+
<ThemeProvider>
|
|
51
|
+
<SnackbarProvider maxSnack={3}>
|
|
52
|
+
<I18nextProvider i18n={i18n}>
|
|
53
|
+
<BrowserRouter>{children}</BrowserRouter>
|
|
54
|
+
</I18nextProvider>
|
|
55
|
+
</SnackbarProvider>
|
|
56
|
+
</ThemeProvider>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
19
59
|
|
|
20
60
|
function App() {
|
|
21
61
|
return (
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
|
|
62
|
+
<Providers>
|
|
63
|
+
<Card>
|
|
64
|
+
<Button>Click me</Button>
|
|
65
|
+
</Card>
|
|
66
|
+
</Providers>
|
|
25
67
|
);
|
|
26
68
|
}
|
|
27
69
|
```
|