fix: passing on fill property to fallback image to support text as overlay with position absolute
Approved-by: Bianca Widstam
This commit is contained in:
@@ -6,18 +6,20 @@ import styles from "./imageFallback.module.css"
|
||||
interface ImageFallbackProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
width?: string
|
||||
height?: string
|
||||
fill?: boolean
|
||||
}
|
||||
|
||||
export default function ImageFallback({
|
||||
width = "100%",
|
||||
height = "100%",
|
||||
className,
|
||||
fill = false,
|
||||
...props
|
||||
}: ImageFallbackProps) {
|
||||
return (
|
||||
<div
|
||||
{...props}
|
||||
className={cx(styles.imageFallback, className)}
|
||||
className={cx(styles.imageFallback, className, { [styles.fill]: fill })}
|
||||
style={{ width, height }}
|
||||
>
|
||||
<MaterialIcon
|
||||
|
||||
Reference in New Issue
Block a user