Fix overlay styles
This commit is contained in:
parent
9cbb34d281
commit
6051a814fa
2 changed files with 8 additions and 6 deletions
|
|
@ -1,4 +1,4 @@
|
|||
.Overlay {
|
||||
.overlay {
|
||||
isolation: isolate;
|
||||
position: fixed;
|
||||
z-index: 9;
|
||||
|
|
@ -7,12 +7,12 @@
|
|||
bottom: 0;
|
||||
left: 0;
|
||||
|
||||
&.Job {
|
||||
&.job {
|
||||
animation: none;
|
||||
backdrop-filter: blur(5px) saturate(100%) brightness(80%) opacity(1);
|
||||
}
|
||||
|
||||
&.Visible {
|
||||
&.visible {
|
||||
animation: 0.24s ease-in fadeInFilter;
|
||||
animation-fill-mode: forwards;
|
||||
backdrop-filter: blur(5px) saturate(100%) brightness(80%) opacity(0);
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ const Overlay = React.forwardRef<HTMLDivElement, Props>(function Overlay(
|
|||
const [visible, setVisible] = useState(open)
|
||||
|
||||
const classes = classNames({
|
||||
Overlay: true,
|
||||
Visible: displayed,
|
||||
[styles.overlay]: true,
|
||||
[styles.visible]: displayed,
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -45,7 +45,9 @@ const Overlay = React.forwardRef<HTMLDivElement, Props>(function Overlay(
|
|||
event.stopPropagation()
|
||||
}
|
||||
|
||||
return visible ? <div className={classes} onClick={handleClick} /> : null
|
||||
return visible ? (
|
||||
<div className={classes} onClick={handleClick} ref={forwardedRef} />
|
||||
) : null
|
||||
})
|
||||
|
||||
Overlay.defaultProps = defaultProps
|
||||
|
|
|
|||
Loading…
Reference in a new issue