1
- import * as React from ' react' ;
2
- import { Fragment , MouseEvent , MutableRefObject } from ' react' ;
3
- import styled from ' @emotion/styled' ;
4
- import { withTheme } from ' emotion-theming' ;
1
+ import * as React from " react" ;
2
+ import { Fragment , MouseEvent , MutableRefObject } from " react" ;
3
+ import styled from " @emotion/styled" ;
4
+ import { withTheme } from "@ emotion/react" ;
5
5
6
- import { Separator } from ' nib-ui' ;
6
+ import { Separator } from " nib-ui" ;
7
7
8
- import getToolbarComponents from ' ../../../utils/editor/toolbar' ;
9
- import { Addon } from ' ../../../types/addon' ;
10
- import { EditorPlugin } from ' ../../../types/application' ;
11
- import { EditorStyle } from ' ../../../types/editor-style' ;
12
- import { useConfigContext } from ' ../../../context/config' ;
13
- import { usePMStateContext } from ' ../../../context/pm-state/index' ;
14
- import { EditorTheme } from ' ../../../types/editor-theme' ;
8
+ import getToolbarComponents from " ../../../utils/editor/toolbar" ;
9
+ import { Addon } from " ../../../types/addon" ;
10
+ import { EditorPlugin } from " ../../../types/application" ;
11
+ import { EditorStyle } from " ../../../types/editor-style" ;
12
+ import { useConfigContext } from " ../../../context/config" ;
13
+ import { usePMStateContext } from " ../../../context/pm-state/index" ;
14
+ import { EditorTheme } from " ../../../types/editor-theme" ;
15
15
16
16
interface TopProps {
17
17
editorWrapper : MutableRefObject < HTMLDivElement | null > ;
@@ -35,10 +35,10 @@ const TopToolbar = ({ editorWrapper, addons = [], theme }: TopProps) => {
35
35
addons
36
36
) ;
37
37
const formattingOption = options . filter (
38
- ( opt : EditorPlugin ) => opt . name !== ' help'
38
+ ( opt : EditorPlugin ) => opt . name !== " help"
39
39
) ;
40
40
const HelpOption = options . filter (
41
- ( opt : EditorPlugin ) => opt . name === ' help'
41
+ ( opt : EditorPlugin ) => opt . name === " help"
42
42
) [ 0 ] ;
43
43
44
44
return (
@@ -68,19 +68,19 @@ const TopToolbar = ({ editorWrapper, addons = [], theme }: TopProps) => {
68
68
69
69
const Wrapper = styled . div (
70
70
{
71
- alignItems : ' flex-start' ,
72
- display : ' flex' ,
73
- flexWrap : ' nowrap' ,
74
- justifyContent : ' space-between' ,
71
+ alignItems : " flex-start" ,
72
+ display : " flex" ,
73
+ flexWrap : " nowrap" ,
74
+ justifyContent : " space-between" ,
75
75
76
- position : ' relative' ,
76
+ position : " relative" ,
77
77
padding : 4 ,
78
78
79
- borderLeft : ' none' ,
80
- borderRight : ' none' ,
81
- borderTop : ' none' ,
79
+ borderLeft : " none" ,
80
+ borderRight : " none" ,
81
+ borderTop : " none" ,
82
82
83
- userSelect : ' none' ,
83
+ userSelect : " none" ,
84
84
} ,
85
85
( { theme : { constants, toolbar } } : { theme : EditorStyle } ) => ( {
86
86
backgroundColor : constants . color . background . primary ,
@@ -93,9 +93,9 @@ const Wrapper = styled.div(
93
93
) ;
94
94
95
95
const ToolbarSection = styled . div ( {
96
- alignItems : ' center' ,
97
- display : ' flex' ,
98
- flexWrap : ' wrap' ,
96
+ alignItems : " center" ,
97
+ display : " flex" ,
98
+ flexWrap : " wrap" ,
99
99
} ) ;
100
100
101
101
export default withTheme ( TopToolbar ) ;
0 commit comments