@majoo-ui/react 1.55.2 → 1.55.3
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/components/devicePreview/DevicePreview.d.ts +5 -0
- package/index.esm.js +4 -3
- package/index.umd.js +10 -8
- package/package.json +1 -1
|
@@ -42,6 +42,11 @@ interface Props {
|
|
|
42
42
|
* @default false
|
|
43
43
|
*/
|
|
44
44
|
withComponent?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* option for use device preview with clickable or not clickable component
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
clickableComponent?: boolean;
|
|
45
50
|
/**
|
|
46
51
|
* option device preview variant
|
|
47
52
|
* @default 'default'
|
package/index.esm.js
CHANGED
|
@@ -24866,7 +24866,8 @@ const IFrameComponent = ({
|
|
|
24866
24866
|
const Device = props => {
|
|
24867
24867
|
const {
|
|
24868
24868
|
withComponent,
|
|
24869
|
-
content
|
|
24869
|
+
content,
|
|
24870
|
+
clickableComponent = true
|
|
24870
24871
|
} = props;
|
|
24871
24872
|
const [currentImgIdx, setImageIdx] = React.useState(0);
|
|
24872
24873
|
const [, setRender] = React.useState(0);
|
|
@@ -24903,7 +24904,7 @@ const Device = props => {
|
|
|
24903
24904
|
properties = Object.assign(Object.assign({}, properties), {
|
|
24904
24905
|
typeDevice: img$j,
|
|
24905
24906
|
cssImage: {
|
|
24906
|
-
top: withComponent ? '6.5%' : '2.5%',
|
|
24907
|
+
top: withComponent && clickableComponent ? '6.5%' : '2.5%',
|
|
24907
24908
|
width: withComponent ? '87%' : '88%'
|
|
24908
24909
|
},
|
|
24909
24910
|
ratio: withComponent ? 9 / 18.8 : 9 / 19.5
|
|
@@ -25357,7 +25358,7 @@ const Device = props => {
|
|
|
25357
25358
|
style: {
|
|
25358
25359
|
width: props.size ? props.size : undefined,
|
|
25359
25360
|
position: 'relative',
|
|
25360
|
-
zIndex: withComponent || (props === null || props === void 0 ? void 0 : props.variant) === 'whatsapp' || (props === null || props === void 0 ? void 0 : props.variant) === 'email' ? 1 : 2
|
|
25361
|
+
zIndex: withComponent && clickableComponent || (props === null || props === void 0 ? void 0 : props.variant) === 'whatsapp' || (props === null || props === void 0 ? void 0 : props.variant) === 'email' ? 1 : 2
|
|
25361
25362
|
},
|
|
25362
25363
|
src: properties.typeDevice,
|
|
25363
25364
|
alt: "device-preview"
|
package/index.umd.js
CHANGED
|
@@ -25284,14 +25284,16 @@
|
|
|
25284
25284
|
|
|
25285
25285
|
var Device = function Device(props) {
|
|
25286
25286
|
var withComponent = props.withComponent,
|
|
25287
|
-
content = props.content
|
|
25288
|
-
|
|
25289
|
-
|
|
25290
|
-
currentImgIdx = _a[0],
|
|
25291
|
-
setImageIdx = _a[1];
|
|
25287
|
+
content = props.content,
|
|
25288
|
+
_a = props.clickableComponent,
|
|
25289
|
+
clickableComponent = _a === void 0 ? true : _a;
|
|
25292
25290
|
|
|
25293
25291
|
var _b = React__namespace.useState(0),
|
|
25294
|
-
|
|
25292
|
+
currentImgIdx = _b[0],
|
|
25293
|
+
setImageIdx = _b[1];
|
|
25294
|
+
|
|
25295
|
+
var _c = React__namespace.useState(0),
|
|
25296
|
+
setRender = _c[1];
|
|
25295
25297
|
|
|
25296
25298
|
var properties = {
|
|
25297
25299
|
typeDevice: '',
|
|
@@ -25326,7 +25328,7 @@
|
|
|
25326
25328
|
properties = __assign(__assign({}, properties), {
|
|
25327
25329
|
typeDevice: img$j,
|
|
25328
25330
|
cssImage: {
|
|
25329
|
-
top: withComponent ? '6.5%' : '2.5%',
|
|
25331
|
+
top: withComponent && clickableComponent ? '6.5%' : '2.5%',
|
|
25330
25332
|
width: withComponent ? '87%' : '88%'
|
|
25331
25333
|
},
|
|
25332
25334
|
ratio: withComponent ? 9 / 18.8 : 9 / 19.5
|
|
@@ -25786,7 +25788,7 @@
|
|
|
25786
25788
|
style: {
|
|
25787
25789
|
width: props.size ? props.size : undefined,
|
|
25788
25790
|
position: 'relative',
|
|
25789
|
-
zIndex: withComponent || (props === null || props === void 0 ? void 0 : props.variant) === 'whatsapp' || (props === null || props === void 0 ? void 0 : props.variant) === 'email' ? 1 : 2
|
|
25791
|
+
zIndex: withComponent && clickableComponent || (props === null || props === void 0 ? void 0 : props.variant) === 'whatsapp' || (props === null || props === void 0 ? void 0 : props.variant) === 'email' ? 1 : 2
|
|
25790
25792
|
},
|
|
25791
25793
|
src: properties.typeDevice,
|
|
25792
25794
|
alt: "device-preview"
|