@builder.io/sdk-svelte 5.2.11 → 5.2.12
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/lib/browser/blocks/image/image.svelte +3 -1
- package/lib/browser/components/block/components/block-styles.svelte +2 -2
- package/lib/browser/components/block/components/live-edit-block-styles.svelte +2 -2
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/constants/sdk-version.js +1 -1
- package/lib/browser/helpers/css.d.ts +2 -0
- package/lib/browser/helpers/css.js +14 -0
- package/lib/edge/blocks/image/image.svelte +3 -1
- package/lib/edge/components/block/components/block-styles.svelte +2 -2
- package/lib/edge/components/block/components/live-edit-block-styles.svelte +2 -2
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/constants/sdk-version.js +1 -1
- package/lib/edge/helpers/css.d.ts +2 -0
- package/lib/edge/helpers/css.js +14 -0
- package/lib/node/blocks/image/image.svelte +3 -1
- package/lib/node/components/block/components/block-styles.svelte +2 -2
- package/lib/node/components/block/components/live-edit-block-styles.svelte +2 -2
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/constants/sdk-version.js +1 -1
- package/lib/node/helpers/css.d.ts +2 -0
- package/lib/node/helpers/css.js +14 -0
- package/package.json +1 -1
- package/src/blocks/image/image.svelte +3 -1
- package/src/components/block/components/block-styles.svelte +8 -2
- package/src/components/block/components/live-edit-block-styles.svelte +8 -2
- package/src/constants/sdk-version.ts +1 -1
- package/src/helpers/css.ts +15 -0
|
@@ -78,7 +78,9 @@ onMount(() => { });
|
|
|
78
78
|
<source type="image/webp" srcset={webpSrcSet()} sizes={sizesToUse()} />
|
|
79
79
|
{/if}<img
|
|
80
80
|
style={stringifyStyles({
|
|
81
|
-
objectPosition:
|
|
81
|
+
objectPosition: `var(--builder-image-position, ${
|
|
82
|
+
backgroundPosition || "center"
|
|
83
|
+
})`,
|
|
82
84
|
objectFit: backgroundSize || "cover",
|
|
83
85
|
...aspectRatioCss(),
|
|
84
86
|
})}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<script>import { getMaxWidthQueryForSize, getSizesForBreakpoints, } from "../../../constants/device-sizes";
|
|
4
4
|
import { TARGET } from "../../../constants/target";
|
|
5
5
|
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
6
|
-
import { createCssClass } from "../../../helpers/css";
|
|
6
|
+
import { createCssClass, getResponsiveStylesWithImagePosition, } from "../../../helpers/css";
|
|
7
7
|
import { checkIsDefined } from "../../../helpers/nullable";
|
|
8
8
|
import InlinedStyles from "../../inlined-styles.svelte";
|
|
9
9
|
export let block;
|
|
@@ -21,7 +21,7 @@ $: canShowBlock = () => {
|
|
|
21
21
|
};
|
|
22
22
|
$: css = () => {
|
|
23
23
|
const processedBlock = block;
|
|
24
|
-
const styles = processedBlock.responsiveStyles;
|
|
24
|
+
const styles = getResponsiveStylesWithImagePosition(processedBlock.responsiveStyles, processedBlock.component?.name === "Image");
|
|
25
25
|
const content = context.content;
|
|
26
26
|
const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
|
|
27
27
|
const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { TARGET } from "../../../constants/target";
|
|
5
5
|
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
6
6
|
import { getProcessedBlock } from "../../../functions/get-processed-block";
|
|
7
|
-
import { createCssClass } from "../../../helpers/css";
|
|
7
|
+
import { createCssClass, getResponsiveStylesWithImagePosition, } from "../../../helpers/css";
|
|
8
8
|
import { findBlockById } from "../../../helpers/find-block";
|
|
9
9
|
import { checkIsDefined } from "../../../helpers/nullable";
|
|
10
10
|
import InlinedStyles from "../../inlined-styles.svelte";
|
|
@@ -39,7 +39,7 @@ $: canShowBlock = () => {
|
|
|
39
39
|
return true;
|
|
40
40
|
};
|
|
41
41
|
$: css = () => {
|
|
42
|
-
const styles = processedBlock?.()?.responsiveStyles;
|
|
42
|
+
const styles = getResponsiveStylesWithImagePosition(processedBlock?.()?.responsiveStyles, processedBlock?.()?.component?.name === "Image");
|
|
43
43
|
const content = contextProvider.content;
|
|
44
44
|
const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
|
|
45
45
|
const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "5.2.
|
|
1
|
+
export declare const SDK_VERSION = "5.2.12";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "5.2.
|
|
1
|
+
export const SDK_VERSION = "5.2.12";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
2
|
+
export declare const getResponsiveStylesWithImagePosition: (styles: BuilderBlock['responsiveStyles'], isBuilderImage: boolean) => BuilderBlock['responsiveStyles'];
|
|
1
3
|
export declare const convertStyleMapToCSSArray: (style: Partial<CSSStyleDeclaration>) => string[];
|
|
2
4
|
export declare const convertStyleMapToCSS: (style: Partial<CSSStyleDeclaration>) => string;
|
|
3
5
|
export declare const createCssClass: ({ mediaQuery, className, styles }: {
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { camelToKebabCase } from '../functions/camel-to-kebab-case';
|
|
2
2
|
import { checkIsDefined } from './nullable';
|
|
3
|
+
const withBuilderImagePosition = (style, fallback) => {
|
|
4
|
+
const imagePosition = style?.objectPosition || fallback;
|
|
5
|
+
return imagePosition ? {
|
|
6
|
+
...style,
|
|
7
|
+
'--builder-image-position': imagePosition
|
|
8
|
+
} : style;
|
|
9
|
+
};
|
|
10
|
+
export const getResponsiveStylesWithImagePosition = (styles, isBuilderImage) => isBuilderImage ? {
|
|
11
|
+
...styles,
|
|
12
|
+
large: withBuilderImagePosition(styles?.large, 'initial'),
|
|
13
|
+
medium: withBuilderImagePosition(styles?.medium),
|
|
14
|
+
small: withBuilderImagePosition(styles?.small),
|
|
15
|
+
xsmall: withBuilderImagePosition(styles?.xsmall)
|
|
16
|
+
} : styles;
|
|
3
17
|
export const convertStyleMapToCSSArray = (style) => {
|
|
4
18
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
5
19
|
if (typeof value === 'string') {
|
|
@@ -78,7 +78,9 @@ onMount(() => { });
|
|
|
78
78
|
<source type="image/webp" srcset={webpSrcSet()} sizes={sizesToUse()} />
|
|
79
79
|
{/if}<img
|
|
80
80
|
style={stringifyStyles({
|
|
81
|
-
objectPosition:
|
|
81
|
+
objectPosition: `var(--builder-image-position, ${
|
|
82
|
+
backgroundPosition || "center"
|
|
83
|
+
})`,
|
|
82
84
|
objectFit: backgroundSize || "cover",
|
|
83
85
|
...aspectRatioCss(),
|
|
84
86
|
})}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<script>import { getMaxWidthQueryForSize, getSizesForBreakpoints, } from "../../../constants/device-sizes";
|
|
4
4
|
import { TARGET } from "../../../constants/target";
|
|
5
5
|
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
6
|
-
import { createCssClass } from "../../../helpers/css";
|
|
6
|
+
import { createCssClass, getResponsiveStylesWithImagePosition, } from "../../../helpers/css";
|
|
7
7
|
import { checkIsDefined } from "../../../helpers/nullable";
|
|
8
8
|
import InlinedStyles from "../../inlined-styles.svelte";
|
|
9
9
|
export let block;
|
|
@@ -21,7 +21,7 @@ $: canShowBlock = () => {
|
|
|
21
21
|
};
|
|
22
22
|
$: css = () => {
|
|
23
23
|
const processedBlock = block;
|
|
24
|
-
const styles = processedBlock.responsiveStyles;
|
|
24
|
+
const styles = getResponsiveStylesWithImagePosition(processedBlock.responsiveStyles, processedBlock.component?.name === "Image");
|
|
25
25
|
const content = context.content;
|
|
26
26
|
const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
|
|
27
27
|
const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { TARGET } from "../../../constants/target";
|
|
5
5
|
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
6
6
|
import { getProcessedBlock } from "../../../functions/get-processed-block";
|
|
7
|
-
import { createCssClass } from "../../../helpers/css";
|
|
7
|
+
import { createCssClass, getResponsiveStylesWithImagePosition, } from "../../../helpers/css";
|
|
8
8
|
import { findBlockById } from "../../../helpers/find-block";
|
|
9
9
|
import { checkIsDefined } from "../../../helpers/nullable";
|
|
10
10
|
import InlinedStyles from "../../inlined-styles.svelte";
|
|
@@ -39,7 +39,7 @@ $: canShowBlock = () => {
|
|
|
39
39
|
return true;
|
|
40
40
|
};
|
|
41
41
|
$: css = () => {
|
|
42
|
-
const styles = processedBlock?.()?.responsiveStyles;
|
|
42
|
+
const styles = getResponsiveStylesWithImagePosition(processedBlock?.()?.responsiveStyles, processedBlock?.()?.component?.name === "Image");
|
|
43
43
|
const content = contextProvider.content;
|
|
44
44
|
const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
|
|
45
45
|
const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "5.2.
|
|
1
|
+
export declare const SDK_VERSION = "5.2.12";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "5.2.
|
|
1
|
+
export const SDK_VERSION = "5.2.12";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
2
|
+
export declare const getResponsiveStylesWithImagePosition: (styles: BuilderBlock['responsiveStyles'], isBuilderImage: boolean) => BuilderBlock['responsiveStyles'];
|
|
1
3
|
export declare const convertStyleMapToCSSArray: (style: Partial<CSSStyleDeclaration>) => string[];
|
|
2
4
|
export declare const convertStyleMapToCSS: (style: Partial<CSSStyleDeclaration>) => string;
|
|
3
5
|
export declare const createCssClass: ({ mediaQuery, className, styles }: {
|
package/lib/edge/helpers/css.js
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { camelToKebabCase } from '../functions/camel-to-kebab-case';
|
|
2
2
|
import { checkIsDefined } from './nullable';
|
|
3
|
+
const withBuilderImagePosition = (style, fallback) => {
|
|
4
|
+
const imagePosition = style?.objectPosition || fallback;
|
|
5
|
+
return imagePosition ? {
|
|
6
|
+
...style,
|
|
7
|
+
'--builder-image-position': imagePosition
|
|
8
|
+
} : style;
|
|
9
|
+
};
|
|
10
|
+
export const getResponsiveStylesWithImagePosition = (styles, isBuilderImage) => isBuilderImage ? {
|
|
11
|
+
...styles,
|
|
12
|
+
large: withBuilderImagePosition(styles?.large, 'initial'),
|
|
13
|
+
medium: withBuilderImagePosition(styles?.medium),
|
|
14
|
+
small: withBuilderImagePosition(styles?.small),
|
|
15
|
+
xsmall: withBuilderImagePosition(styles?.xsmall)
|
|
16
|
+
} : styles;
|
|
3
17
|
export const convertStyleMapToCSSArray = (style) => {
|
|
4
18
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
5
19
|
if (typeof value === 'string') {
|
|
@@ -78,7 +78,9 @@ onMount(() => { });
|
|
|
78
78
|
<source type="image/webp" srcset={webpSrcSet()} sizes={sizesToUse()} />
|
|
79
79
|
{/if}<img
|
|
80
80
|
style={stringifyStyles({
|
|
81
|
-
objectPosition:
|
|
81
|
+
objectPosition: `var(--builder-image-position, ${
|
|
82
|
+
backgroundPosition || "center"
|
|
83
|
+
})`,
|
|
82
84
|
objectFit: backgroundSize || "cover",
|
|
83
85
|
...aspectRatioCss(),
|
|
84
86
|
})}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<script>import { getMaxWidthQueryForSize, getSizesForBreakpoints, } from "../../../constants/device-sizes";
|
|
4
4
|
import { TARGET } from "../../../constants/target";
|
|
5
5
|
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
6
|
-
import { createCssClass } from "../../../helpers/css";
|
|
6
|
+
import { createCssClass, getResponsiveStylesWithImagePosition, } from "../../../helpers/css";
|
|
7
7
|
import { checkIsDefined } from "../../../helpers/nullable";
|
|
8
8
|
import InlinedStyles from "../../inlined-styles.svelte";
|
|
9
9
|
export let block;
|
|
@@ -21,7 +21,7 @@ $: canShowBlock = () => {
|
|
|
21
21
|
};
|
|
22
22
|
$: css = () => {
|
|
23
23
|
const processedBlock = block;
|
|
24
|
-
const styles = processedBlock.responsiveStyles;
|
|
24
|
+
const styles = getResponsiveStylesWithImagePosition(processedBlock.responsiveStyles, processedBlock.component?.name === "Image");
|
|
25
25
|
const content = context.content;
|
|
26
26
|
const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
|
|
27
27
|
const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { TARGET } from "../../../constants/target";
|
|
5
5
|
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
6
6
|
import { getProcessedBlock } from "../../../functions/get-processed-block";
|
|
7
|
-
import { createCssClass } from "../../../helpers/css";
|
|
7
|
+
import { createCssClass, getResponsiveStylesWithImagePosition, } from "../../../helpers/css";
|
|
8
8
|
import { findBlockById } from "../../../helpers/find-block";
|
|
9
9
|
import { checkIsDefined } from "../../../helpers/nullable";
|
|
10
10
|
import InlinedStyles from "../../inlined-styles.svelte";
|
|
@@ -39,7 +39,7 @@ $: canShowBlock = () => {
|
|
|
39
39
|
return true;
|
|
40
40
|
};
|
|
41
41
|
$: css = () => {
|
|
42
|
-
const styles = processedBlock?.()?.responsiveStyles;
|
|
42
|
+
const styles = getResponsiveStylesWithImagePosition(processedBlock?.()?.responsiveStyles, processedBlock?.()?.component?.name === "Image");
|
|
43
43
|
const content = contextProvider.content;
|
|
44
44
|
const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
|
|
45
45
|
const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "5.2.
|
|
1
|
+
export declare const SDK_VERSION = "5.2.12";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "5.2.
|
|
1
|
+
export const SDK_VERSION = "5.2.12";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
2
|
+
export declare const getResponsiveStylesWithImagePosition: (styles: BuilderBlock['responsiveStyles'], isBuilderImage: boolean) => BuilderBlock['responsiveStyles'];
|
|
1
3
|
export declare const convertStyleMapToCSSArray: (style: Partial<CSSStyleDeclaration>) => string[];
|
|
2
4
|
export declare const convertStyleMapToCSS: (style: Partial<CSSStyleDeclaration>) => string;
|
|
3
5
|
export declare const createCssClass: ({ mediaQuery, className, styles }: {
|
package/lib/node/helpers/css.js
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { camelToKebabCase } from '../functions/camel-to-kebab-case';
|
|
2
2
|
import { checkIsDefined } from './nullable';
|
|
3
|
+
const withBuilderImagePosition = (style, fallback) => {
|
|
4
|
+
const imagePosition = style?.objectPosition || fallback;
|
|
5
|
+
return imagePosition ? {
|
|
6
|
+
...style,
|
|
7
|
+
'--builder-image-position': imagePosition
|
|
8
|
+
} : style;
|
|
9
|
+
};
|
|
10
|
+
export const getResponsiveStylesWithImagePosition = (styles, isBuilderImage) => isBuilderImage ? {
|
|
11
|
+
...styles,
|
|
12
|
+
large: withBuilderImagePosition(styles?.large, 'initial'),
|
|
13
|
+
medium: withBuilderImagePosition(styles?.medium),
|
|
14
|
+
small: withBuilderImagePosition(styles?.small),
|
|
15
|
+
xsmall: withBuilderImagePosition(styles?.xsmall)
|
|
16
|
+
} : styles;
|
|
3
17
|
export const convertStyleMapToCSSArray = (style) => {
|
|
4
18
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
5
19
|
if (typeof value === 'string') {
|
package/package.json
CHANGED
|
@@ -87,7 +87,9 @@
|
|
|
87
87
|
<source type="image/webp" srcset={webpSrcSet()} sizes={sizesToUse()} />
|
|
88
88
|
{/if}<img
|
|
89
89
|
style={stringifyStyles({
|
|
90
|
-
objectPosition:
|
|
90
|
+
objectPosition: `var(--builder-image-position, ${
|
|
91
|
+
backgroundPosition || "center"
|
|
92
|
+
})`,
|
|
91
93
|
objectFit: backgroundSize || "cover",
|
|
92
94
|
...aspectRatioCss(),
|
|
93
95
|
})}
|
|
@@ -13,7 +13,10 @@
|
|
|
13
13
|
import { TARGET } from "../../../constants/target";
|
|
14
14
|
import type { BuilderContextInterface } from "../../../context/types";
|
|
15
15
|
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
createCssClass,
|
|
18
|
+
getResponsiveStylesWithImagePosition,
|
|
19
|
+
} from "../../../helpers/css";
|
|
17
20
|
import { checkIsDefined } from "../../../helpers/nullable";
|
|
18
21
|
import type { BuilderBlock } from "../../../types/builder-block";
|
|
19
22
|
import InlinedStyles from "../../inlined-styles.svelte";
|
|
@@ -34,7 +37,10 @@
|
|
|
34
37
|
};
|
|
35
38
|
$: css = () => {
|
|
36
39
|
const processedBlock = block;
|
|
37
|
-
const styles =
|
|
40
|
+
const styles = getResponsiveStylesWithImagePosition(
|
|
41
|
+
processedBlock.responsiveStyles,
|
|
42
|
+
processedBlock.component?.name === "Image"
|
|
43
|
+
);
|
|
38
44
|
const content = context.content;
|
|
39
45
|
const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(
|
|
40
46
|
content?.meta?.breakpoints || {}
|
|
@@ -13,7 +13,10 @@
|
|
|
13
13
|
import { TARGET } from "../../../constants/target";
|
|
14
14
|
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
15
15
|
import { getProcessedBlock } from "../../../functions/get-processed-block";
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
createCssClass,
|
|
18
|
+
getResponsiveStylesWithImagePosition,
|
|
19
|
+
} from "../../../helpers/css";
|
|
17
20
|
import { findBlockById } from "../../../helpers/find-block";
|
|
18
21
|
import { checkIsDefined } from "../../../helpers/nullable";
|
|
19
22
|
import type {
|
|
@@ -54,7 +57,10 @@
|
|
|
54
57
|
return true;
|
|
55
58
|
};
|
|
56
59
|
$: css = () => {
|
|
57
|
-
const styles =
|
|
60
|
+
const styles = getResponsiveStylesWithImagePosition(
|
|
61
|
+
processedBlock?.()?.responsiveStyles,
|
|
62
|
+
processedBlock?.()?.component?.name === "Image"
|
|
63
|
+
);
|
|
58
64
|
const content = contextProvider.content;
|
|
59
65
|
const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(
|
|
60
66
|
content?.meta?.breakpoints || {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "5.2.
|
|
1
|
+
export const SDK_VERSION = "5.2.12"
|
package/src/helpers/css.ts
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import { camelToKebabCase } from '../functions/camel-to-kebab-case';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
2
3
|
import { checkIsDefined } from './nullable';
|
|
4
|
+
const withBuilderImagePosition = (style: Partial<CSSStyleDeclaration> | undefined, fallback?: string): Partial<CSSStyleDeclaration> | undefined => {
|
|
5
|
+
const imagePosition = style?.objectPosition || fallback;
|
|
6
|
+
return imagePosition ? ({
|
|
7
|
+
...style,
|
|
8
|
+
'--builder-image-position': imagePosition
|
|
9
|
+
} as Partial<CSSStyleDeclaration>) : style;
|
|
10
|
+
};
|
|
11
|
+
export const getResponsiveStylesWithImagePosition = (styles: BuilderBlock['responsiveStyles'], isBuilderImage: boolean): BuilderBlock['responsiveStyles'] => isBuilderImage ? {
|
|
12
|
+
...styles,
|
|
13
|
+
large: withBuilderImagePosition(styles?.large, 'initial'),
|
|
14
|
+
medium: withBuilderImagePosition(styles?.medium),
|
|
15
|
+
small: withBuilderImagePosition(styles?.small),
|
|
16
|
+
xsmall: withBuilderImagePosition(styles?.xsmall)
|
|
17
|
+
} : styles;
|
|
3
18
|
export const convertStyleMapToCSSArray = (style: Partial<CSSStyleDeclaration>): string[] => {
|
|
4
19
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
5
20
|
if (typeof value === 'string') {
|