feat(compo):增加支持窗体拖动的组件。
This commit is contained in:
17
src/components/WindowMoveHandler/WindowMoveHandler.tsx
Normal file
17
src/components/WindowMoveHandler/WindowMoveHandler.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { css } from "@emotion/react";
|
||||
import styled from "@emotion/styled";
|
||||
|
||||
const Handler = styled.div(
|
||||
({ theme }) => css`
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: ${theme.spacings.xxs * 24}px;
|
||||
z-index: 1;
|
||||
`
|
||||
);
|
||||
|
||||
export function WindowMoveHandler() {
|
||||
return <Handler data-tauri-drag-region />;
|
||||
}
|
@@ -0,0 +1 @@
|
||||
export { WindowMoveHandler } from "./WindowMoveHandler/WindowMoveHandler";
|
||||
|
Reference in New Issue
Block a user