tee3apps-cms-sdk-react 0.0.19 → 0.0.20

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.
@@ -122,6 +122,7 @@ const ImageComponent: React.FC<ImageComponentMainProps> = ({
122
122
  };
123
123
 
124
124
  const currentMode = getCurrentMode();
125
+ const containerHeight = boxHeight === 'auto' ? 'auto' : boxHeight;
125
126
  const link = bannerLink(props);
126
127
  const imageUrl = `${Linodeurl}${props.images?.url || props.images?.all?.url}`;
127
128
  const altText = props.images.alt || '';
@@ -131,9 +132,7 @@ const ImageComponent: React.FC<ImageComponentMainProps> = ({
131
132
  src={imageUrl}
132
133
  alt={altText}
133
134
  className="fitted-image"
134
- style={{
135
- cursor: link ? 'pointer' : 'default'
136
- }}
135
+ style={{ cursor: link ? 'pointer' : 'default' }}
137
136
  />
138
137
  );
139
138
 
@@ -142,15 +141,15 @@ const ImageComponent: React.FC<ImageComponentMainProps> = ({
142
141
  className="image-box"
143
142
  style={{
144
143
  borderRadius: `${currentMode.borderRadius}px`,
145
- width: '100%',
144
+ height: containerHeight,
146
145
  overflow: 'hidden',
147
146
  }}
148
147
  >
149
148
  {link ? (
150
149
  <a
151
150
  href={link}
152
- target={props?.linktype=='EXTERNAL' ? props?.link?.target :'_self'}
153
- style={{ display: 'block', width: '100%' }}
151
+ target={props?.linktype=='EXTERNAL' ? props?.link?.target :'_self'}
152
+ style={{ display: 'block', width: '100%', height: '100%' }}
154
153
  >
155
154
  {imageElement}
156
155
  </a>
@@ -1263,11 +1263,12 @@ const TabComponent: React.FC<TabComponentMainProps> = ({ props, deviceMode = 'we
1263
1263
  style={{
1264
1264
  position: 'relative',
1265
1265
  width: '100%',
1266
+ height: `${props.height}px`,
1266
1267
  overflow: 'hidden',
1267
1268
  }}
1268
1269
  >
1269
1270
  {currentProduct && (
1270
- <div style={{ width: '100%' }}>
1271
+ <div style={{ width: '100%', height: '100%' }}>
1271
1272
  <ProductCard product={currentProduct} layout={layout} />
1272
1273
  </div>
1273
1274
  )}
@@ -1425,7 +1426,7 @@ const TabComponent: React.FC<TabComponentMainProps> = ({ props, deviceMode = 'we
1425
1426
  gridTemplateColumns: getGridColumns(),
1426
1427
  gridTemplateRows: getGridRows(),
1427
1428
  gap: '12px',
1428
- height: 'auto', // Use auto height for group products
1429
+ height: `${props.height}px`, // Use TabComponent height for group products
1429
1430
  overflow: 'hidden',
1430
1431
  padding: '12px',
1431
1432
  alignItems: 'stretch',
@@ -1436,6 +1437,7 @@ const TabComponent: React.FC<TabComponentMainProps> = ({ props, deviceMode = 'we
1436
1437
  style={{
1437
1438
  position: 'relative',
1438
1439
  width: '100%',
1440
+ height: `${props.height}px`,
1439
1441
  overflow: 'hidden',
1440
1442
  }}
1441
1443
  >
package/src/index.css CHANGED
@@ -53,21 +53,22 @@ body {
53
53
  }
54
54
 
55
55
  /* -------------- IMAGE STYLES --------------- */
56
-
57
56
  .image-box {
57
+
58
58
  width: 100%;
59
- overflow: hidden;
60
- display: block;
61
- position: relative;
62
- max-height: 280px;
59
+ /* height: 280px; */
60
+ overflow: hidden;
61
+ display: flex;
62
+ align-items: center;
63
+ justify-content: center;
64
+
63
65
  }
64
66
 
65
67
  .fitted-image {
66
- width: 100%;
67
- height: auto;
68
- max-height: 280px;
69
- display: block;
68
+ width: 100%;
69
+ height: 100%;
70
70
  }
71
+
71
72
  .mainpagearea{
72
73
  background-color: rgb(205, 205, 205);
73
74
  width: 100%;