mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-06-22 01:28:29 +07:00
optimized scrolls
This commit is contained in:
parent
948817e8fc
commit
f169de370a
12 changed files with 110 additions and 98 deletions
|
@ -1,7 +1,7 @@
|
|||
.blur {
|
||||
filter: blur(0);
|
||||
transition: filter 0.25s;
|
||||
max-height: 100vh;
|
||||
width: 100vw;
|
||||
overflow: visible auto;
|
||||
// max-height: 100vh;
|
||||
// width: 100vw;
|
||||
// overflow: visible auto;
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
border-radius: $panel_radius 0 0 $panel_radius;
|
||||
background-size: cover;
|
||||
flex: 0 0 $comment_height;
|
||||
will-change: transform;
|
||||
|
||||
@include tablet {
|
||||
height: 32px;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { FC } from 'react';
|
||||
import React, { FC, memo } from 'react';
|
||||
import * as styles from './styles.scss';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { selectNode } from '~/redux/node/selectors';
|
||||
|
@ -10,7 +10,7 @@ const mapStateToProps = state => pick(['current_cover_image'], selectNode(state)
|
|||
|
||||
type IProps = ReturnType<typeof mapStateToProps> & {};
|
||||
|
||||
const PageCoverUnconnected: FC<IProps> = ({ current_cover_image }) =>
|
||||
const PageCoverUnconnected: FC<IProps> = memo(({ current_cover_image }) =>
|
||||
current_cover_image
|
||||
? createPortal(
|
||||
<div
|
||||
|
@ -19,7 +19,8 @@ const PageCoverUnconnected: FC<IProps> = ({ current_cover_image }) =>
|
|||
/>,
|
||||
document.body
|
||||
)
|
||||
: null;
|
||||
: null
|
||||
);
|
||||
|
||||
const PageCover = connect(mapStateToProps)(PageCoverUnconnected);
|
||||
export { PageCover };
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
animation: fadeIn 2s;
|
||||
will-change: transform, opacity;
|
||||
|
||||
&::after {
|
||||
content: ' ';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue