diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2020-09-21 20:47:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-21 20:47:07 +0200 |
commit | c3f9271adebf37ed66664d978cfae2a6b327ebff (patch) | |
tree | 8c223cb42e90afc2e124ca231af1d79e113500a5 | |
parent | 08802fc982328b3c99cc4d4c2a0bec8eeea4c8dc (diff) | |
parent | 172bc0155f0ad70d046db3151539715ee1690678 (diff) | |
download | which-ui-c3f9271adebf37ed66664d978cfae2a6b327ebff.tar.gz |
Merge pull request #100 from which-ecosystem/fix/background-image
Fix background image bug
-rw-r--r-- | src/components/Image/BackgroundImage.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/Image/BackgroundImage.tsx b/src/components/Image/BackgroundImage.tsx index e749d10..7d8e6e2 100644 --- a/src/components/Image/BackgroundImage.tsx +++ b/src/components/Image/BackgroundImage.tsx @@ -11,13 +11,14 @@ const useStyles = makeStyles({ root: { position: 'absolute', width: '100%', - height: '100%' + height: '100%', + overflow: 'hidden' }, image: { objectFit: 'cover', pointerEvents: 'none', width: '100%', - height: '100%' + minHeight: '100%' } }); @@ -25,9 +26,9 @@ const BackgroundImage: React.FC<PropTypes> = ({ src, alt }) => { const classes = useStyles(); return ( - <picture className={classes.root}> + <div className={classes.root}> <Image src={src} alt={alt} className={classes.image} /> - </picture> + </div> ); }; |