File tree Expand file tree Collapse file tree 3 files changed +56
-3
lines changed
Expand file tree Collapse file tree 3 files changed +56
-3
lines changed Original file line number Diff line number Diff line change 1- import React , { Suspense } from 'react' ;
1+ import React from 'react' ;
22import './App.scss' ;
33import ReactGA from 'react-ga' ;
4- import { UI } from './ui-demo/UI' ;
4+ import { Test } from './Test' ;
5+ //import { UI } from './ui-demo/UI';
56
67ReactGA . initialize ( "UA-144490437-1" ) ;
78ReactGA . pageview ( window . location . pathname + window . location . search ) ;
89
910const App : React . FC = ( ) => {
10- return < UI />
11+ return < Test />
1112}
1213
1314export default App ;
Original file line number Diff line number Diff line change 1+ .test {
2+ .spaces-space {
3+ // transition: width 0.5s ease;
4+ }
5+ }
Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+ import * as Space from "react-spaces" ;
3+ import './Test.scss' ;
4+
5+ const COLLAPSED_SIZE = 20 ;
6+ const MINIMUM_SIZE = 200 ;
7+
8+ export const Test : React . FC = ( ) => {
9+ const [ size , setSize ] = React . useState ( 300 ) ;
10+
11+ const onResizeStart = ( ) => {
12+ } ;
13+
14+ const onResizeEnd = ( width : number ) => {
15+ setSize ( width ) ;
16+ }
17+
18+ return (
19+ < Space . ViewPort className = "test" >
20+
21+ < Space . LeftResizable
22+ style = { { backgroundColor : 'yellow' , padding : 10 } }
23+ size = { size }
24+ handleSize = { 60 }
25+ maximumSize = { 600 }
26+ minimumSize = { 100 }
27+ onResizeStart = { onResizeStart }
28+ onResizeEnd = { onResizeEnd }
29+ order = { 1 } >
30+ Hello
31+ </ Space . LeftResizable >
32+
33+ < Space . Left
34+ style = { { backgroundColor : 'navy' , color : 'white' , padding : 10 } }
35+ size = { 200 }
36+ order = { 2 } >
37+ Something
38+ </ Space . Left >
39+
40+ < Space . Fill
41+ style = { { backgroundColor : 'red' , padding : 10 } } >
42+ World
43+ </ Space . Fill >
44+
45+ </ Space . ViewPort >
46+ )
47+ }
You can’t perform that action at this time.
0 commit comments