Skip to content

Commit 19b412c

Browse files
committed
Updated docs/test to reflect library changes
1 parent 02ac0ba commit 19b412c

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

demo/src/docs/Docs.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ export const Docs = () => {
7474
export const Description = (desc: string, mobileDesc: string) => (
7575
<Space.Centered>
7676
<span className="description">
77-
<strong className="desc">{desc}</strong>
78-
<strong className="mobileDesc">{mobileDesc}</strong>
79-
<Space.Info>{info => <div>{info.width.toFixed()} x {info.height.toFixed()}</div> }</Space.Info>
77+
<strong className="desc">{desc}</strong>
78+
<strong className="mobileDesc">{mobileDesc}</strong><br />
79+
<Space.Info>{info => <span>{info.width.toFixed()} x {info.height.toFixed()}</span> }</Space.Info>
8080
</span>
8181
</Space.Centered>
8282
)

demo/src/ui-demo/UI.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@
2020

2121
.bottom-pane-container {
2222
.spaces-resize-handle {
23-
opacity: 1 !important;
24-
height: 2px !important;
23+
background-color: #333 !important;
24+
}
25+
}
26+
27+
.side-bar-container {
28+
.resize-right {
2529
background-color: #333 !important;
2630
}
2731
}

demo/src/ui-demo/UI.tsx

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as Space from 'react-spaces';
33
import 'antd/dist/antd.css';
44
import './UI.scss';
55
import MonacoEditor from 'react-monaco-editor';
6+
import { CenterType } from 'react-spaces';
67

78
export 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

Comments
 (0)