@builder.io/sdk-solid 0.1.6 → 0.1.7
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/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Show, For, createSignal } from "solid-js";
|
|
1
|
+
import { useContext, Show, For, createSignal } from "solid-js";
|
|
2
2
|
|
|
3
3
|
import { css } from "solid-styled-components";
|
|
4
4
|
|
|
@@ -7,6 +7,7 @@ import { getSizesForBreakpoints } from "../../constants/device-sizes";
|
|
|
7
7
|
import RenderInlinedStyles from "../../components/render-inlined-styles.jsx";
|
|
8
8
|
import { TARGET } from "../../constants/target.js";
|
|
9
9
|
import { convertStyleMapToCSS } from "../../helpers/css";
|
|
10
|
+
import BuilderContext from "../../context/builder.context.js";
|
|
10
11
|
|
|
11
12
|
function Columns(props) {
|
|
12
13
|
function getGutterSize() {
|
|
@@ -60,7 +61,7 @@ function Columns(props) {
|
|
|
60
61
|
|
|
61
62
|
function getWidthForBreakpointSize(size) {
|
|
62
63
|
const breakpointSizes = getSizesForBreakpoints(
|
|
63
|
-
|
|
64
|
+
builderContext.content?.meta?.breakpoints || {}
|
|
64
65
|
);
|
|
65
66
|
return breakpointSizes[size].max;
|
|
66
67
|
}
|
|
@@ -122,6 +123,8 @@ function Columns(props) {
|
|
|
122
123
|
return this.columnStyleObjects.column.small;
|
|
123
124
|
}
|
|
124
125
|
|
|
126
|
+
const builderContext = useContext(BuilderContext);
|
|
127
|
+
|
|
125
128
|
return (
|
|
126
129
|
<div
|
|
127
130
|
class={
|