@@ -12,41 +12,33 @@ const clearPath =
1212 ' 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-' +
1313 '28.7 64-64V306c0-35.3-28.7-64-64-64z' ;
1414
15- const getSvg = ( path : string , props = { } , align = false ) => {
16- return (
17- < i { ...props } >
18- < svg
19- viewBox = "0 0 1024 1024"
20- width = "1em"
21- height = "1em"
22- fill = "currentColor"
23- style = { align ? { verticalAlign : '-.125em ' } : { } }
24- >
25- < path d = { path } p-id = "5827" />
26- </ svg >
27- </ i >
28- ) ;
29- } ;
15+ const getSvg = ( path : string , props = { } , align = false ) => (
16+ < i { ...props } >
17+ < svg
18+ viewBox = "0 0 1024 1024"
19+ width = "1em"
20+ height = "1em"
21+ fill = "currentColor"
22+ style = { align ? { verticalAlign : '-0.125em ' } : { } }
23+ >
24+ < path d = { path } />
25+ </ svg >
26+ </ i >
27+ ) ;
3028
31- const MyControl = ( ) => {
29+ const MyControl : React . FC = ( ) => {
3230 const [ visible1 , setVisible1 ] = React . useState ( true ) ;
3331 const [ visible2 , setVisible2 ] = React . useState ( false ) ;
3432 const [ visible3 , setVisible3 ] = React . useState ( false ) ;
3533 const [ width , setWidth ] = React . useState ( 600 ) ;
3634 const [ destroyOnClose , setDestroyOnClose ] = React . useState ( false ) ;
3735 const [ center , setCenter ] = React . useState ( false ) ;
38- const [ mousePosition , setMousePosition ] = React . useState ( {
39- x : null ,
40- y : null ,
41- } ) ;
36+ const [ mousePosition , setMousePosition ] = React . useState ( { x : null , y : null } ) ;
4237 const [ useIcon , setUseIcon ] = React . useState ( false ) ;
4338 const [ forceRender , setForceRender ] = React . useState ( false ) ;
4439
4540 const onClick = ( e : React . MouseEvent ) => {
46- setMousePosition ( {
47- x : e . pageX ,
48- y : e . pageY ,
49- } ) ;
41+ setMousePosition ( { x : e . pageX , y : e . pageY } ) ;
5042 setVisible1 ( true ) ;
5143 } ;
5244
0 commit comments