@@ -3,6 +3,7 @@ import * as Space from 'react-spaces';
33import 'antd/dist/antd.css' ;
44import './UI.scss' ;
55import MonacoEditor from 'react-monaco-editor' ;
6+ import { CenterType } from 'react-spaces' ;
67
78export const UI = ( ) => {
89 return (
@@ -15,20 +16,18 @@ export const UI = () => {
1516 )
1617}
1718
18- const Header : React . FC = ( props ) => {
19+ const Header = ( ) => {
1920 return (
20- < Space . Top className = "title-bar" size = { 30 } style = { { backgroundColor : '#333' , color : '#c5c5c5' } } >
21- < Space . Centered >
22- < Space . Left className = "menu-bar" >
21+ < Space . Top className = "title-bar" centerContent = { CenterType . HorizontalVertical } size = { 30 } style = { { backgroundColor : '#333' , color : '#c5c5c5' } } >
22+ < Space . Left className = "menu-bar" >
2323
24- </ Space . Left >
25- UI Demo - Example UI interface
26- </ Space . Centered >
24+ </ Space . Left >
25+ UI Demo - Example UI interface
2726 </ Space . Top >
2827 )
2928}
3029
31- const Main : React . FC = ( props ) => {
30+ const Main = ( ) => {
3231 return (
3332 < Space . Fill style = { { backgroundColor : '#1E1E1E' } } >
3433 < Space . Fill >
@@ -40,7 +39,7 @@ const Main: React.FC = (props) => {
4039 )
4140}
4241
43- const Editor : React . FC = ( props ) => {
42+ const Editor = ( ) => {
4443 const [ code , setCode ] = React . useState ( 'import * as React from \'react\';\r\nimport * as Space from \'react-spaces\';\r\n\r\nexport const App = () => {\r\n <Space.ViewPort>\r\n <Space.Top size={30}>\r\n Hello!\r\n </Space.Top>\r\n <Space.Fill>\r\n World!\r\n </Space.Fill>\r\n </Space.ViewPort>\r\n}' ) ;
4544
4645 const options = {
@@ -52,7 +51,6 @@ const Editor: React.FC = (props) => {
5251 < Space . Fill >
5352 < Space . Fill >
5453 < Space . Top className = "editor-tabs" size = { 40 } >
55-
5654 </ Space . Top >
5755 < Space . Fill className = "editor-main" >
5856 < MonacoEditor
@@ -68,17 +66,16 @@ const Editor: React.FC = (props) => {
6866 )
6967}
7068
71- const IconPane : React . FC = ( props ) => {
69+ const IconPane = ( ) => {
7270 return (
7371 < Space . Left order = { 1 } className = "side-bar-icons" size = { 50 } style = { { backgroundColor : '#333' } } >
74-
7572 </ Space . Left >
7673 )
7774}
7875
79- const SideBar : React . FC = ( props ) => {
76+ const SideBar = ( ) => {
8077 return (
81- < Space . LeftResizable order = { 2 } className = "side-bar" size = { 300 } style = { { backgroundColor : '#252526' } } >
78+ < Space . LeftResizable order = { 2 } className = "side-bar" size = { 300 } handleSize = { 2 } overlayHandle = { false } style = { { backgroundColor : '#252526' } } >
8279 < SideBarPane order = { 1 } title = "Open editors" height = { 200 } >
8380
8481 </ SideBarPane >
@@ -120,9 +117,9 @@ const SideBarPaneInner: React.FC<{ title: string }> = (props) => {
120117 )
121118}
122119
123- const BottomPane : React . FC = ( props ) => {
120+ const BottomPane = ( ) => {
124121 return (
125- < Space . BottomResizable className = "bottom-pane" size = "25%" >
122+ < Space . BottomResizable className = "bottom-pane" size = "25%" handleSize = { 2 } >
126123 </ Space . BottomResizable >
127124 )
128125}
0 commit comments