@weavy/uikit-react 19.0.5 → 19.0.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 +6 -17
- package/changelog.md +6 -0
- package/dist/cjs/index.es5.js +2 -0
- package/dist/cjs/index.es5.js.map +1 -0
- package/dist/esm/index.es5.js +2 -0
- package/dist/esm/index.es5.js.map +1 -0
- package/package.json +19 -4
- package/rollup.config.mjs +61 -35
package/README.md
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
React based UI kit for Weavy.
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
## Installation
|
|
9
8
|
|
|
10
9
|
```shell
|
|
@@ -13,21 +12,14 @@ npm install @weavy/uikit-react
|
|
|
13
12
|
|
|
14
13
|
## Minimum requirements
|
|
15
14
|
|
|
16
|
-
- `React` >=
|
|
17
|
-
- `Weavy Backend` >=
|
|
15
|
+
- `React` >= 16.0.0
|
|
16
|
+
- `Weavy Backend` >= 19.0.0
|
|
18
17
|
|
|
19
18
|
## Getting started
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
> Make sure you have a Weavy backend up and running in order to test any of the frontend examples. To quickly get a backend up and running you can register for a free account on <a href="https://get.weavy.io">get.weavy.io</a>. <br>That is the easiest and quickest way to get started and does not require you to deploy your own backend.
|
|
20
|
+
> Make sure you have a Weavy backend up and running in order to test any of the frontend examples. To quickly get a backend up and running you can register for a free account on <a href="https://get.weavy.com">get.weavy.com</a>. <br>That is the easiest and quickest way to get started and does not require you to deploy your own backend.
|
|
23
21
|
|
|
24
|
-
The React UI kit is dependant of
|
|
25
|
-
|
|
26
|
-
In your project directory, run:
|
|
27
|
-
|
|
28
|
-
```shell
|
|
29
|
-
npm install @weavy/themes
|
|
30
|
-
```
|
|
22
|
+
The React UI kit is dependant of styles included in the `./dist/css/weavy.css`.
|
|
31
23
|
|
|
32
24
|
The Weavy UI kit components that you decide to use must be wrapped in the `WeavyProvider` component. The `WeavyProvider` handles all the common functionality for all the Weavy React UI components.
|
|
33
25
|
|
|
@@ -67,7 +59,7 @@ const getToken = () => {
|
|
|
67
59
|
});
|
|
68
60
|
}
|
|
69
61
|
|
|
70
|
-
const weavyClient = new WeavyClient({ url: "https://url-to-weavy.
|
|
62
|
+
const weavyClient = new WeavyClient({ url: "https://url-to-environment.weavy.io", tokenFactory: getToken})
|
|
71
63
|
|
|
72
64
|
function App() {
|
|
73
65
|
return (
|
|
@@ -82,7 +74,6 @@ function App() {
|
|
|
82
74
|
export default App;
|
|
83
75
|
```
|
|
84
76
|
|
|
85
|
-
|
|
86
77
|
## Add the stylesheet
|
|
87
78
|
|
|
88
79
|
In your index.tsx (or index.js if you are not using TypeScript) file, add the following
|
|
@@ -92,7 +83,7 @@ In your index.tsx (or index.js if you are not using TypeScript) file, add the fo
|
|
|
92
83
|
// ---------------------------------------------------------
|
|
93
84
|
// add the following line of code
|
|
94
85
|
// ---------------------------------------------------------
|
|
95
|
-
import "@weavy/
|
|
86
|
+
import "@weavy/uikit-react/dist/css/weavy.css";
|
|
96
87
|
// ---------------------------------------------------------
|
|
97
88
|
|
|
98
89
|
const container = document.getElementById('root');
|
|
@@ -100,12 +91,10 @@ const root = createRoot(container!);
|
|
|
100
91
|
root.render(<App />);
|
|
101
92
|
```
|
|
102
93
|
|
|
103
|
-
|
|
104
94
|
## Run the app
|
|
105
95
|
|
|
106
96
|
Start your React app. You should see the Weavy Messenger component rendering a Conversation list and a Conversation with the currently selected conversation.
|
|
107
97
|
|
|
108
|
-
|
|
109
98
|
## Documentation
|
|
110
99
|
|
|
111
100
|
To learn more about all the different components that you can use and how to setup the authentication flow, head over to our [Documentation site](https://weavy.com/docs/frontend/uikit-react)
|