Desktop: Optimized resizing window

pull/4093/head
Laurent Cozic 2020-11-15 19:22:42 +00:00
parent 6769026265
commit ccc726f2ae
1 changed files with 9 additions and 3 deletions

View File

@ -1,11 +1,17 @@
import { ThemeAppearance } from '@joplin/lib/themes/type';
import styled from 'styled-components';
export const StyledWrapperRoot = styled.div`
// Need to use `attrs` otherwise styled-components creates many instances of the
// style when the component is resized.
// https://github.com/styled-components/styled-components/issues/1212
export const StyledWrapperRoot = styled.div.attrs((props: any) => ({
style: {
width: props.size.width,
height: props.size.height,
},
}))`
position: relative;
display: flex;
width: ${props => props.size.width}px;
height: ${props => props.size.height}px;
`;
export const StyledMoveOverlay = styled.div`