@gem-sdk/components 2.0.0-dev.652 → 2.0.0-dev.653
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.
|
@@ -37,9 +37,9 @@ const composeResponsiveAspectRatio = ({ shape, defaultRatio, originalImage })=>{
|
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
const composeAspectRatio = ({ device, shape, originalImage })=>{
|
|
40
|
-
const { width, height, shape: currentShape, shapeValue } = shape?.[device] ?? {};
|
|
40
|
+
const { width, height, shape: currentShape, shapeValue, customShapeValue } = shape?.[device] ?? {};
|
|
41
41
|
if (currentShape === 'original') return originalImage?.height ? `${originalImage.width}/${originalImage.height}` : undefined;
|
|
42
|
-
if (currentShape === 'custom') return height ? `${width?.replace('px', '')}/${height?.replace('px', '')}` : undefined;
|
|
42
|
+
if (currentShape === 'custom') return height ? `${width?.replace('px', '')}/${height?.replace('px', '')}` : customShapeValue || undefined;
|
|
43
43
|
return shapeValue;
|
|
44
44
|
};
|
|
45
45
|
const composeLabelPosition = ({ input, isHorizontal })=>{
|
|
@@ -35,9 +35,9 @@ const composeResponsiveAspectRatio = ({ shape, defaultRatio, originalImage })=>{
|
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
const composeAspectRatio = ({ device, shape, originalImage })=>{
|
|
38
|
-
const { width, height, shape: currentShape, shapeValue } = shape?.[device] ?? {};
|
|
38
|
+
const { width, height, shape: currentShape, shapeValue, customShapeValue } = shape?.[device] ?? {};
|
|
39
39
|
if (currentShape === 'original') return originalImage?.height ? `${originalImage.width}/${originalImage.height}` : undefined;
|
|
40
|
-
if (currentShape === 'custom') return height ? `${width?.replace('px', '')}/${height?.replace('px', '')}` : undefined;
|
|
40
|
+
if (currentShape === 'custom') return height ? `${width?.replace('px', '')}/${height?.replace('px', '')}` : customShapeValue || undefined;
|
|
41
41
|
return shapeValue;
|
|
42
42
|
};
|
|
43
43
|
const composeLabelPosition = ({ input, isHorizontal })=>{
|