@redneckz/wildless-cms-uni-blocks 0.3.81 → 0.3.83
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/bundle/bundle.umd.js +3 -2
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/GroupBlock/renderBlocksTypes.js +4 -3
- package/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/dist/ui-kit/BlocksList/renderBlocksList.js +3 -2
- package/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/lib/components/GroupBlock/renderBlocksTypes.js +4 -3
- package/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/lib/ui-kit/BlocksList/renderBlocksList.js +3 -2
- package/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +3 -2
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js +4 -3
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +3 -2
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js +4 -3
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +3 -2
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/src/components/GroupBlock/renderBlocksTypes.tsx +6 -3
- package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +6 -3
- package/package.json +1 -1
- package/src/components/GroupBlock/renderBlocksTypes.tsx +6 -3
- package/src/ui-kit/BlocksList/renderBlocksList.tsx +6 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { JSXBlock } from '../../components/ContentPage/ContentPage';
|
|
2
2
|
import type { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
3
|
+
import { style2className } from '../../utils/style2className';
|
|
3
4
|
import type { GroupBlockDef } from './BlocksTypeProps';
|
|
4
5
|
import { EmbeddableGroupBlocks } from './EmbeddableGroupBlocks';
|
|
5
|
-
import { style2className } from '../../utils/style2className';
|
|
6
6
|
|
|
7
7
|
type EmbeddableBlocksProps = {
|
|
8
8
|
groupBlocks?: GroupBlockDef[];
|
|
@@ -17,12 +17,15 @@ export const renderBlock =
|
|
|
17
17
|
if (!type || !(type in EmbeddableGroupBlocks)) {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
const { style, ...rest } = block;
|
|
22
|
+
|
|
23
|
+
const classNameBlock = style2className(style);
|
|
21
24
|
const EmbeddedBlock: JSXBlock = EmbeddableGroupBlocks[type];
|
|
22
25
|
|
|
23
26
|
return (
|
|
24
27
|
<div className={className} key={`block_${i}`}>
|
|
25
|
-
<EmbeddedBlock context={context} {...
|
|
28
|
+
<EmbeddedBlock context={context} {...rest} className={classNameBlock} />
|
|
26
29
|
</div>
|
|
27
30
|
);
|
|
28
31
|
};
|
|
@@ -21,15 +21,18 @@ const renderBlock =
|
|
|
21
21
|
if (!type || !(type in EmbeddableBlocks)) {
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
const { style, ...rest } = block;
|
|
26
|
+
|
|
27
|
+
const classNameBlock = style2className(style);
|
|
25
28
|
const EmbeddedBlock: JSXBlock = EmbeddableBlocks[type];
|
|
26
29
|
|
|
27
30
|
return (
|
|
28
31
|
<EmbeddedBlock
|
|
29
32
|
key={`block_${i}`}
|
|
30
|
-
context={context}
|
|
31
|
-
{...block}
|
|
32
33
|
className={`${className} ${classNameBlock}`}
|
|
34
|
+
context={context}
|
|
35
|
+
{...rest}
|
|
33
36
|
/>
|
|
34
37
|
);
|
|
35
38
|
};
|