yangsuite-ui-utils 1.0.17 → 1.0.18
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 +31 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,7 +52,37 @@ Refer to [exported packages](./src/index.js) to see all components and functions
|
|
|
52
52
|
|
|
53
53
|
## Components
|
|
54
54
|
|
|
55
|
-
###
|
|
55
|
+
### Loader
|
|
56
|
+
```js
|
|
57
|
+
import { Loader } from "yangsuite-ui-utils";
|
|
58
|
+
function myComponent() {
|
|
59
|
+
return <Loader msg="Fetching devices" />;
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
Simple spinning loader.
|
|
63
|
+
|
|
64
|
+
Props:
|
|
65
|
+
|
|
66
|
+
- `msg`: Message to display while loading data
|
|
67
|
+
|
|
68
|
+
### Layout
|
|
69
|
+
```js
|
|
70
|
+
import { Layout } from "yangsuite-ui-utils";
|
|
71
|
+
```
|
|
72
|
+
Use it as root component to wrap your app with `Header` and `Navbar`
|
|
73
|
+
|
|
74
|
+
### useCustomNaviage
|
|
75
|
+
```js
|
|
76
|
+
import useCustomNavigate from "./navigation";
|
|
77
|
+
function myComponent() {
|
|
78
|
+
const navigate = useCustomNavigate();
|
|
79
|
+
|
|
80
|
+
return <btn onClick={(e) => navigate('link')}></btn>;
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
Hook used to navigate beetween diffrent apps. It will automaticlly decide if redirection should be only within given plugin or beyond it.
|
|
84
|
+
|
|
85
|
+
## Redux layout
|
|
56
86
|
|
|
57
87
|
Store
|
|
58
88
|
|
|
@@ -76,21 +106,6 @@ Actions
|
|
|
76
106
|
}
|
|
77
107
|
```
|
|
78
108
|
|
|
79
|
-
### Loader
|
|
80
|
-
|
|
81
|
-
Simple spinning loader.
|
|
82
|
-
|
|
83
|
-
Props:
|
|
84
|
-
|
|
85
|
-
- `msg`: Message to display while loading data
|
|
86
|
-
|
|
87
|
-
### NavBar
|
|
88
|
-
|
|
89
|
-
Sidebar with header. Used redux actions to control it.
|
|
90
|
-
|
|
91
|
-
### Layout
|
|
92
|
-
Use it as root component to wrap your app with `Header` and `Navbar`
|
|
93
|
-
|
|
94
109
|
## Development
|
|
95
110
|
|
|
96
111
|
1. Install node modules and build bundle\
|