Skip to content

Commit 3ad91e4

Browse files
authored
Merge pull request #27 from ethanknights/fix/enable-no-image-card
Allow empty backgroundImage property on cards in TSX
2 parents 4d6e31f + 9a99cf8 commit 3ad91e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

streamlit_card/frontend/src/stCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Card extends StreamlitComponentBase {
4141
height: `${height}px`,
4242
borderRadius: "20px",
4343
overflow: "hidden",
44-
backgroundImage: `url(${image})`,
44+
backgroundImage: image ? `url(${image})` : "none",
4545
backgroundPosition: "center",
4646
backgroundSize: "cover",
4747
backgroundRepeat: "no-repeat",

0 commit comments

Comments
 (0)