1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Desktop: Optimized resizing window

This commit is contained in:
Laurent Cozic 2020-11-15 19:22:42 +00:00
parent 6769026265
commit ccc726f2ae

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`