Skip to content

Commit c6f1549

Browse files
author
Anuj Rajak
committed
review comments
1 parent 4486ed9 commit c6f1549

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

src/components/DynamicComponents.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import "@patternfly/react-core/dist/styles/base.css";
22
import "@patternfly/chatbot/dist/css/main.css";
3+
import "../global.css";
4+
35
import isArray from "lodash/isArray";
46
import isEmpty from "lodash/isEmpty";
57
import map from "lodash/map";

src/components/ImageComponent.tsx

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,11 @@ const ImageComponent: React.FC<ImageComponentProps> = ({
2727
<img
2828
src={image}
2929
alt={title}
30-
style={{
31-
width: "100%",
32-
height: "auto",
33-
borderRadius: "var(--pf-global--BorderRadius--sm)",
34-
objectFit: "cover",
35-
}}
30+
className="image-component-img"
3631
onError={() => setImageError(true)}
3732
/>
3833
) : (
39-
<div
40-
style={{
41-
width: "100%",
42-
height: "200px",
43-
backgroundColor: "var(--pf-global--Color--200)",
44-
borderRadius: "var(--pf-global--BorderRadius--sm)",
45-
display: "flex",
46-
alignItems: "center",
47-
justifyContent: "center",
48-
color: "var(--pf-global--Color--300)",
49-
}}
50-
>
34+
<div className="image-component-placeholder">
5135
{imageError ? "Image failed to load" : "No image provided"}
5236
</div>
5337
)}

0 commit comments

Comments
 (0)