Skip to content

Commit

Permalink
fix: overlay switch style
Browse files Browse the repository at this point in the history
  • Loading branch information
MinJieLiu committed Apr 25, 2020
1 parent 20f4f80 commit 05835dd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-photo-view",
"version": "0.4.3",
"version": "0.4.4",
"description": "一款精致的 React 的图片预览组件",
"author": "MinJieLiu",
"license": "MIT",
Expand Down
8 changes: 5 additions & 3 deletions src/PhotoSlider.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
.PhotoView-PhotoSlider__ArrowRight,
.PhotoView-PhotoSlider__FooterWrap {
opacity: 0;
}
}

&:hover {
opacity: 0;
}
&-PhotoSlider__willClose {
.PhotoView-PhotoSlider__BannerWrap:hover {
opacity: 0;
}
}

Expand Down
8 changes: 7 additions & 1 deletion src/PhotoSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,13 @@ export default class PhotoSlider extends React.Component<IPhotoSliderProps, Phot

return (
<SlideWrap
className={classNames({ 'PhotoView-PhotoSlider__clean': !visible }, className)}
className={classNames(
{
'PhotoView-PhotoSlider__clean': !currentOverlayVisible,
'PhotoView-PhotoSlider__willClose': !visible,
},
className,
)}
role="dialog"
onClick={e => e.stopPropagation()}
>
Expand Down

0 comments on commit 05835dd

Please sign in to comment.