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" ;
55
6- import { Separator } from ' nib-ui' ;
6+ import { Separator } from " nib-ui" ;
77
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" ;
1515
1616interface TopProps {
1717 editorWrapper : MutableRefObject < HTMLDivElement | null > ;
@@ -35,10 +35,10 @@ const TopToolbar = ({ editorWrapper, addons = [], theme }: TopProps) => {
3535 addons
3636 ) ;
3737 const formattingOption = options . filter (
38- ( opt : EditorPlugin ) => opt . name !== ' help'
38+ ( opt : EditorPlugin ) => opt . name !== " help"
3939 ) ;
4040 const HelpOption = options . filter (
41- ( opt : EditorPlugin ) => opt . name === ' help'
41+ ( opt : EditorPlugin ) => opt . name === " help"
4242 ) [ 0 ] ;
4343
4444 return (
@@ -68,19 +68,19 @@ const TopToolbar = ({ editorWrapper, addons = [], theme }: TopProps) => {
6868
6969const Wrapper = styled . div (
7070 {
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" ,
7575
76- position : ' relative' ,
76+ position : " relative" ,
7777 padding : 4 ,
7878
79- borderLeft : ' none' ,
80- borderRight : ' none' ,
81- borderTop : ' none' ,
79+ borderLeft : " none" ,
80+ borderRight : " none" ,
81+ borderTop : " none" ,
8282
83- userSelect : ' none' ,
83+ userSelect : " none" ,
8484 } ,
8585 ( { theme : { constants, toolbar } } : { theme : EditorStyle } ) => ( {
8686 backgroundColor : constants . color . background . primary ,
@@ -93,9 +93,9 @@ const Wrapper = styled.div(
9393) ;
9494
9595const ToolbarSection = styled . div ( {
96- alignItems : ' center' ,
97- display : ' flex' ,
98- flexWrap : ' wrap' ,
96+ alignItems : " center" ,
97+ display : " flex" ,
98+ flexWrap : " wrap" ,
9999} ) ;
100100
101101export default withTheme ( TopToolbar ) ;
0 commit comments