File tree 3 files changed +62
-0
lines changed
3 files changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ import * as React from 'react' ;
2
+ import styled from 'styled-components' ;
3
+ import OpaqueLayer from './OpaqueLayer' ;
4
+ import zIndexes from '../../lib/styles/zIndexes' ;
5
+
6
+ const PopupBaseBlock = styled . div `
7
+ position: fixed;
8
+ top: 0;
9
+ left: 0;
10
+ width: 100%;
11
+ height: 100%;
12
+ z-index: ${ zIndexes . Popup } ;
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ & > .wrapper {
17
+ width: 25rem;
18
+ background: white;
19
+ padding: 2rem 1.5rem;
20
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.09);
21
+ }
22
+ ` ;
23
+
24
+ interface PopupBaseProps {
25
+ visible : boolean ;
26
+ }
27
+
28
+ const PopupBase : React . SFC < PopupBaseProps > = ( { visible } ) => {
29
+ return (
30
+ < >
31
+ < OpaqueLayer visible = { visible } />
32
+ < PopupBaseBlock >
33
+ < div className = "wrapper" > Hey tehre!</ div >
34
+ </ PopupBaseBlock >
35
+ </ >
36
+ ) ;
37
+ } ;
38
+
39
+ export default PopupBase ;
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ import TitleTextarea from './TitleTextarea';
14
14
import { getScrollTop } from '../../lib/utils' ;
15
15
import convertToMarkdown from '../../lib/convertToMarkdown' ;
16
16
17
+ import PopupBase from '../common/PopupBase' ;
18
+
17
19
Quill . register ( 'modules/markdownShortcuts' , MarkdownShortcuts ) ;
18
20
19
21
export interface QuillEditorProps { }
@@ -78,6 +80,20 @@ const Editor = styled.div`
78
80
overflow-x: auto;
79
81
}
80
82
83
+ h1,
84
+ h2,
85
+ h3,
86
+ h4 {
87
+ margin-top: 0.5em;
88
+ margin-bottom: 0.5em;
89
+ }
90
+
91
+ p + h1,
92
+ p + h2,
93
+ p + h3,
94
+ p + h4 {
95
+ margin-top: 1.5em;
96
+ }
81
97
ul,
82
98
ol {
83
99
padding-left: 0;
@@ -110,6 +126,11 @@ const Editor = styled.div`
110
126
}
111
127
}
112
128
${ postStyles }
129
+
130
+ p + blockquote, blockquote + p {
131
+ margin-top: 1rem;
132
+ margin-bottom: 1rem;
133
+ }
113
134
}
114
135
.ql-editor.ql-blank::before {
115
136
left: 0px;
@@ -418,6 +439,7 @@ export default class QuillEditor extends React.Component<
418
439
/>
419
440
) }
420
441
</ Editor >
442
+ < PopupBase visible = { true } />
421
443
</ QuillEditorWrapper >
422
444
) ;
423
445
}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const zIndexes = {
2
2
OpaqueLayer : 10 ,
3
3
AuthModal : 20 ,
4
4
Toolbar : 10 ,
5
+ Popup : 25 ,
5
6
} ;
6
7
7
8
export default zIndexes ;
You can’t perform that action at this time.
0 commit comments