Skip to content

Commit

Permalink
fix(material): pass the correct css reactive property
Browse files Browse the repository at this point in the history
  • Loading branch information
juanrgm committed Feb 2, 2023
1 parent 42f755e commit 28f1bda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tall-comics-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@suid/material": patch
---

Fix the `image` property in the `CardMedia` component
4 changes: 3 additions & 1 deletion packages/material/src/CardMedia/CardMedia.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ const CardMedia = $.component(function CardMedia({
!isMediaComponent() && props.image
? mergeProps(
{
backgroundImage: `url("${props.image}")`,
get "background-image"() {
return `url("${props.image}")`;
},
},
typeof otherProps.style === "object" && otherProps.style
? otherProps.style
Expand Down

0 comments on commit 28f1bda

Please sign in to comment.