@wandelbots/wandelbots-js-react-components 0.0.0-semantically-released → 1.1.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/README.md +11 -11
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Wandelbots React Components
|
|
2
2
|
|
|
3
|
-
A growing collection of ready-made React UI components for use with the Wandelbots
|
|
3
|
+
A growing collection of ready-made React UI components based on MaterialUI and React Three Fiber for use with the Wandelbots platform.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install @wandelbots/
|
|
6
|
+
npm install @wandelbots/wandelbots-js-react-components
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
### Basic usage:
|
|
@@ -11,7 +11,7 @@ npm install @wandelbots/wandelui
|
|
|
11
11
|
Import your desired components or functions from the package:
|
|
12
12
|
|
|
13
13
|
```jsx
|
|
14
|
-
import { WandelscriptEditor, ... } from '@wandelbots/
|
|
14
|
+
import { WandelscriptEditor, ... } from '@wandelbots/wandelbots-js-react-components'
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
### Index
|
|
@@ -26,7 +26,7 @@ import { WandelscriptEditor, ... } from '@wandelbots/wandelui'
|
|
|
26
26
|
</ul>
|
|
27
27
|
<li><a href="#materialui">Material UI</a></li>
|
|
28
28
|
<ul>
|
|
29
|
-
<li><a href="#
|
|
29
|
+
<li><a href="#defaulttheme">getDefaultThemeOptionsForMui</a></li>
|
|
30
30
|
</ul>
|
|
31
31
|
</ul>
|
|
32
32
|
</td>
|
|
@@ -52,24 +52,24 @@ The WandelscriptEditor provides an interface for editing snippets of Wandelscrip
|
|
|
52
52
|
|
|
53
53
|
# Material UI
|
|
54
54
|
|
|
55
|
-
####
|
|
55
|
+
#### createDefaultMuiTheme
|
|
56
56
|
|
|
57
57
|
```tsx
|
|
58
|
-
declare function
|
|
58
|
+
declare function createDefaultMuiTheme(mode: 'dark'|'light' = 'dark'): Theme
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
This function creates a [Material UI theme](https://mui.com/material-ui/customization/theming/) with the default
|
|
61
|
+
This function creates a [Material UI theme](https://mui.com/material-ui/customization/theming/) with the default colors, typography, and MUI component configuration.
|
|
62
62
|
|
|
63
63
|
Example use in a MUI application:
|
|
64
64
|
|
|
65
65
|
```tsx
|
|
66
66
|
import { ThemeProvider } from "@mui/system"
|
|
67
|
-
import {
|
|
67
|
+
import { createDefaultMuiTheme } from "@wandelbots/wandelui"
|
|
68
68
|
|
|
69
|
-
const
|
|
69
|
+
const defaultDarkTheme = createDefaultMuiTheme('dark')
|
|
70
70
|
|
|
71
71
|
export const Layout = ({ children }: { children: React.ReactNode }) => {
|
|
72
|
-
return <ThemeProvider theme={
|
|
72
|
+
return <ThemeProvider theme={defaultDarkTheme}>
|
|
73
73
|
{children}
|
|
74
74
|
</ThemeProvider>
|
|
75
75
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@react-spring/three": "^9.7.3",
|
|
71
71
|
"@react-three/drei": "^9.105.4",
|
|
72
72
|
"@react-three/fiber": ">=8.0",
|
|
73
|
-
"@wandelbots/
|
|
73
|
+
"@wandelbots/wandelbots-js": "^1.1.0",
|
|
74
74
|
"react": "^18.2.0",
|
|
75
75
|
"react-dom": "^18.2.0",
|
|
76
76
|
"three": ">=0.137"
|