@developer_tribe/react-builder 0.1.14 → 0.1.15
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/RenderMainNode.d.ts +2 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/package.json +1 -1
- package/src/RenderMainNode.tsx +3 -3
- package/src/RenderPage.tsx +4 -2
package/src/RenderMainNode.tsx
CHANGED
|
@@ -12,15 +12,15 @@ export const mainNodeContext = createContext<{
|
|
|
12
12
|
} | null>(null);
|
|
13
13
|
|
|
14
14
|
export function RenderMainNode({
|
|
15
|
-
|
|
15
|
+
children,
|
|
16
16
|
localication,
|
|
17
17
|
defaultLanguage,
|
|
18
18
|
theme,
|
|
19
19
|
}: {
|
|
20
|
-
node: Node;
|
|
21
20
|
localication?: Localication;
|
|
22
21
|
defaultLanguage?: string;
|
|
23
22
|
theme?: 'light' | 'dark';
|
|
23
|
+
children: React.ReactNode;
|
|
24
24
|
warning?: string;
|
|
25
25
|
setWarning?: (message: string) => void;
|
|
26
26
|
}) {
|
|
@@ -31,7 +31,7 @@ export function RenderMainNode({
|
|
|
31
31
|
value={{ localication, defaultLanguage, theme, warning, setWarning }}
|
|
32
32
|
>
|
|
33
33
|
{warning && <div className="warning">{warning}</div>}
|
|
34
|
-
|
|
34
|
+
{children}
|
|
35
35
|
</mainNodeContext.Provider>
|
|
36
36
|
);
|
|
37
37
|
}
|
package/src/RenderPage.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import { Localication } from './types/PreviewConfig';
|
|
|
2
2
|
import { TargetedScreenSize } from './types/TargetedScreenSize';
|
|
3
3
|
import { RenderMainNode } from './RenderMainNode';
|
|
4
4
|
import { Node } from './types/Node';
|
|
5
|
+
import { RenderNode } from './build-components';
|
|
5
6
|
type RenderPageProps = {
|
|
6
7
|
data: Node;
|
|
7
8
|
screenSize: TargetedScreenSize;
|
|
@@ -50,10 +51,11 @@ export function RenderPage({
|
|
|
50
51
|
{
|
|
51
52
|
<RenderMainNode
|
|
52
53
|
localication={localication}
|
|
53
|
-
node={data}
|
|
54
54
|
defaultLanguage={defaultLanguage}
|
|
55
55
|
theme={theme}
|
|
56
|
-
|
|
56
|
+
>
|
|
57
|
+
<RenderNode node={data} />
|
|
58
|
+
</RenderMainNode>
|
|
57
59
|
}
|
|
58
60
|
</div>
|
|
59
61
|
</div>
|