一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
40 行
1.2 KiB
TypeScript
40 行
1.2 KiB
TypeScript
import { ThemeAppearance } from '@joplin/lib/themes/type';
|
|
import styled from 'styled-components';
|
|
|
|
// 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
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- styled-components.attrs typing collides with the dynamic style attrs we set here
|
|
export const StyledWrapperRoot: any = styled.div.attrs((props: { size: { width: number; height: number } }) => ({
|
|
style: {
|
|
width: props.size.width,
|
|
height: props.size.height,
|
|
},
|
|
}))`
|
|
position: relative;
|
|
display: flex;
|
|
`;
|
|
|
|
export const StyledMoveOverlay = styled.div`
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
z-index: 100;
|
|
background-color: ${props => props.theme.appearance === ThemeAppearance.Light ? 'rgba(0,0,0,0.5)' : 'rgba(255,255,255,0.5)'};
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
`;
|
|
|
|
export const MoveModeRootMessage = styled.h1`
|
|
position: absolute;
|
|
bottom: 10px;
|
|
font-size: 1em;
|
|
|
|
z-index:200;
|
|
background-color: ${props => props.theme.backgroundColor};
|
|
padding: 10px;
|
|
`;
|