@firecms/core 3.0.0-canary.62 → 3.0.0-canary.63
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/app/Scaffold.d.ts +4 -0
- package/dist/app/useApp.d.ts +3 -3
- package/dist/core/NavigationRoutes.d.ts +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -4
- package/src/app/Scaffold.tsx +5 -1
- package/src/app/useApp.tsx +2 -2
- package/src/core/NavigationRoutes.tsx +3 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firecms/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-canary.
|
|
4
|
+
"version": "3.0.0-canary.63",
|
|
5
5
|
"description": "Awesome Firebase/Firestore-based headless open-source CMS",
|
|
6
6
|
"funding": {
|
|
7
7
|
"url": "https://github.com/sponsors/firecmsco"
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"./package.json": "./package.json"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@firecms/formex": "^3.0.0-canary.
|
|
50
|
-
"@firecms/ui": "^3.0.0-canary.
|
|
49
|
+
"@firecms/formex": "^3.0.0-canary.63",
|
|
50
|
+
"@firecms/ui": "^3.0.0-canary.63",
|
|
51
51
|
"@fontsource/jetbrains-mono": "^5.0.20",
|
|
52
52
|
"@hello-pangea/dnd": "^16.6.0",
|
|
53
53
|
"@radix-ui/react-portal": "^1.0.4",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"dist",
|
|
112
112
|
"src"
|
|
113
113
|
],
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "ebf432414a10a3e316be86d4b6ad4aa7be2786ad",
|
|
115
115
|
"publishConfig": {
|
|
116
116
|
"access": "public"
|
|
117
117
|
},
|
package/src/app/Scaffold.tsx
CHANGED
|
@@ -17,6 +17,10 @@ export interface ScaffoldProps {
|
|
|
17
17
|
*/
|
|
18
18
|
autoOpenDrawer?: boolean;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Logo to be displayed in the top bar and drawer.
|
|
22
|
+
* Note that this has no effect if you are using a custom AppBar or Drawer.
|
|
23
|
+
*/
|
|
20
24
|
logo?: string;
|
|
21
25
|
|
|
22
26
|
className?: string;
|
|
@@ -174,7 +178,7 @@ function DrawerWrapper(props: {
|
|
|
174
178
|
)}
|
|
175
179
|
|
|
176
180
|
<div
|
|
177
|
-
className={`absolute right-0 top-4 ${
|
|
181
|
+
className={`z-20 absolute right-0 top-4 ${
|
|
178
182
|
props.open ? "opacity-100" : "opacity-0 invisible"
|
|
179
183
|
} transition-opacity duration-200 ease-in-out`}>
|
|
180
184
|
<IconButton
|
package/src/app/useApp.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import React from "react";
|
|
|
4
4
|
* This context represents the state of the app in terms of layout.
|
|
5
5
|
* @group Core
|
|
6
6
|
*/
|
|
7
|
-
export type
|
|
7
|
+
export type AppState = {
|
|
8
8
|
hasDrawer: boolean,
|
|
9
9
|
drawerHovered: boolean,
|
|
10
10
|
drawerOpen: boolean,
|
|
@@ -14,7 +14,7 @@ export type DrawerState = {
|
|
|
14
14
|
logo?: string
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export const AppContext = React.createContext<
|
|
17
|
+
export const AppContext = React.createContext<AppState>({
|
|
18
18
|
hasDrawer: false,
|
|
19
19
|
drawerHovered: false,
|
|
20
20
|
drawerOpen: false,
|
|
@@ -15,7 +15,7 @@ export type NavigationRoutesProps = {
|
|
|
15
15
|
*/
|
|
16
16
|
homePage?: React.ReactNode;
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
children?: React.ReactNode | React.ReactNode[]
|
|
19
19
|
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -31,7 +31,7 @@ export type NavigationRoutesProps = {
|
|
|
31
31
|
export const NavigationRoutes = React.memo<NavigationRoutesProps>(
|
|
32
32
|
function NavigationRoutes({
|
|
33
33
|
homePage = <DefaultHomePage/>,
|
|
34
|
-
|
|
34
|
+
children
|
|
35
35
|
}: NavigationRoutesProps) {
|
|
36
36
|
|
|
37
37
|
const location = useLocation();
|
|
@@ -111,7 +111,7 @@ export const NavigationRoutes = React.memo<NavigationRoutesProps>(
|
|
|
111
111
|
|
|
112
112
|
{notFoundRoute}
|
|
113
113
|
|
|
114
|
-
{
|
|
114
|
+
{children}
|
|
115
115
|
|
|
116
116
|
</Routes>
|
|
117
117
|
);
|