File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { Rect } from "../../hooks/useDragToResize";
33import useDetectMouseDownOutside from "../../hooks/useDetectMouseDownOutside" ;
44import useSystemSettings from "../../stores/systemSettingsStore" ;
55
6- import "./AppPopup.scss " ;
6+ import { StyledContent , StyledPopup } from "./Styled.AppPopup " ;
77
88interface AppPopupProps < Element extends HTMLElement > {
99 appRef : React . RefObject < Element > ;
@@ -44,21 +44,17 @@ function AppPopup<Element extends HTMLElement>({
4444 }
4545
4646 return (
47- < div
48- className = "app-popup"
47+ < StyledPopup
48+ { ... rect }
4949 ref = { thisRef }
50- style = { { ...rect } }
5150 onContextMenu = { handleContextMenu }
5251 onClick = { ( e ) => e . stopPropagation ( ) }
5352 onDoubleClick = { ( e ) => e . stopPropagation ( ) }
5453 >
55- < div
56- className = "app-popup__content"
57- style = { { backgroundColor : settings . mainColor } }
58- >
54+ < StyledContent backgroundColor = { settings . mainColor } >
5955 { children }
60- </ div >
61- </ div >
56+ </ StyledContent >
57+ </ StyledPopup >
6258 ) ;
6359}
6460
Original file line number Diff line number Diff line change 1+ import styled from "@emotion/styled" ;
2+ import { Rect } from "../../hooks/useDragToResize" ;
3+
4+ export const StyledPopup = styled . div < Rect > `
5+ backdrop-filter: brightness(80%);
6+ position: fixed;
7+ z-index: 9999;
8+ display: flex;
9+ justify-content: center;
10+ align-items: center;
11+ top: ${ ( props ) => props . top } px;
12+ left: ${ ( props ) => props . left } px;
13+ width: ${ ( props ) => props . width } px;
14+ height: ${ ( props ) => props . height } px;
15+ ` ;
16+
17+ export const StyledContent = styled . div < { backgroundColor : string } > `
18+ width: 300px;
19+ display: flex;
20+ flex-direction: column;
21+ box-shadow: 0 0 40px rgb(0, 0, 0, 0.5);
22+ border-radius: 10px;
23+ background-color: ${ ( props ) => props . backgroundColor } ;
24+ ` ;
You can’t perform that action at this time.
0 commit comments