umwd-components 0.1.63 → 0.1.64
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.
|
@@ -13,10 +13,10 @@ var utils = require('../lib/utils.js');
|
|
|
13
13
|
function StrapiImage(_ref) {
|
|
14
14
|
let {
|
|
15
15
|
src,
|
|
16
|
-
alt,
|
|
17
|
-
height,
|
|
18
|
-
width,
|
|
19
|
-
style
|
|
16
|
+
alt = "",
|
|
17
|
+
height = 100,
|
|
18
|
+
width = 100,
|
|
19
|
+
style = {}
|
|
20
20
|
} = _ref;
|
|
21
21
|
if (!src) return null;
|
|
22
22
|
const imageUrl = utils.getStrapiMedia(src);
|
|
@@ -11,10 +11,10 @@ import { getStrapiMedia } from '../lib/utils.js';
|
|
|
11
11
|
function StrapiImage(_ref) {
|
|
12
12
|
let {
|
|
13
13
|
src,
|
|
14
|
-
alt,
|
|
15
|
-
height,
|
|
16
|
-
width,
|
|
17
|
-
style
|
|
14
|
+
alt = "",
|
|
15
|
+
height = 100,
|
|
16
|
+
width = 100,
|
|
17
|
+
style = {}
|
|
18
18
|
} = _ref;
|
|
19
19
|
if (!src) return null;
|
|
20
20
|
const imageUrl = getStrapiMedia(src);
|
package/package.json
CHANGED
package/src/components/Page.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import
|
|
5
|
+
import TextImageSection from "./TextImageSection.tsx";
|
|
6
6
|
import { HeroSection } from "./HeroSection.tsx";
|
|
7
7
|
import { FeatureSection } from "./FeaturesSection.tsx";
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ function blockRenderer(block) {
|
|
|
13
13
|
case "layout.feature-section":
|
|
14
14
|
return <FeatureSection key={block.id} data={block} />;
|
|
15
15
|
case "layout.text-image-section":
|
|
16
|
-
return <
|
|
16
|
+
return <TextImageSection key={block.id} data={block} />;
|
|
17
17
|
default:
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
@@ -12,10 +12,10 @@ interface StrapiImageProps {
|
|
|
12
12
|
|
|
13
13
|
export function StrapiImage({
|
|
14
14
|
src,
|
|
15
|
-
alt,
|
|
16
|
-
height,
|
|
17
|
-
width,
|
|
18
|
-
style,
|
|
15
|
+
alt = "",
|
|
16
|
+
height = 100,
|
|
17
|
+
width = 100,
|
|
18
|
+
style = {},
|
|
19
19
|
}: Readonly<StrapiImageProps>) {
|
|
20
20
|
if (!src) return null;
|
|
21
21
|
const imageUrl = getStrapiMedia(src);
|