File tree Expand file tree Collapse file tree 10 files changed +25
-21
lines changed Expand file tree Collapse file tree 10 files changed +25
-21
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ import {
13
13
} from './sections' ;
14
14
15
15
ReactDOM . render (
16
- < React . Fragment >
16
+ < main >
17
+ < h1 > Default Behavior</ h1 >
17
18
< Simple />
18
19
< DefaultSize />
19
20
< ResponsiveSize />
@@ -23,6 +24,6 @@ ReactDOM.render(
23
24
< h1 > Custom Behavior</ h1 >
24
25
< CollapsibleSection />
25
26
< InteractiveSection />
26
- </ React . Fragment > ,
27
+ </ main > ,
27
28
document . getElementById ( 'app' ) ,
28
29
) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export class CollapsibleSection extends React.PureComponent {
15
15
16
16
render ( ) {
17
17
return (
18
- < div >
18
+ < section >
19
19
< h2 > Collapsible section demo</ h2 >
20
20
< Container
21
21
className = "container"
@@ -26,7 +26,7 @@ export class CollapsibleSection extends React.PureComponent {
26
26
< Bar size = { 10 } className = "bar" onClick = { this . onBarClick } />
27
27
< Section className = "section" />
28
28
</ Container >
29
- </ div >
29
+ </ section >
30
30
) ;
31
31
}
32
32
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import React from 'react';
3
3
import * as Resizer from '../../src' ;
4
4
5
5
export const DefaultSize = ( ) => (
6
- < div >
6
+ < section >
7
7
< h2 > default size demo</ h2 >
8
8
< Resizer . Container className = "container" >
9
9
< Resizer . Section className = "section" defaultSize = { 400 } >
@@ -12,5 +12,5 @@ export const DefaultSize = () => (
12
12
< Resizer . Bar size = { 10 } className = "bar" />
13
13
< Resizer . Section className = "section" />
14
14
</ Resizer . Container >
15
- </ div >
15
+ </ section >
16
16
) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import React from 'react';
3
3
import * as Resizer from '../../src' ;
4
4
5
5
export const FixedSize = ( ) => (
6
- < div >
6
+ < section >
7
7
< h2 > Fixed size demo</ h2 >
8
8
< Resizer . Container className = "container" >
9
9
< Resizer . Section className = "section" size = { 500 } >
@@ -33,5 +33,5 @@ export const FixedSize = () => (
33
33
max size is 500px.
34
34
</ Resizer . Section >
35
35
</ Resizer . Container >
36
- </ div >
36
+ </ section >
37
37
) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ function onResizing(resizer: Resizer): void {
18
18
}
19
19
20
20
export const InteractiveSection = ( ) => (
21
- < div >
21
+ < section >
22
22
< h2 > Interactive section demo</ h2 >
23
23
< Container className = "container" beforeApplyResizer = { onResizing } >
24
24
< Section className = "section" />
@@ -27,5 +27,5 @@ export const InteractiveSection = () => (
27
27
< Bar size = { 10 } className = "bar" />
28
28
< Section className = "section" />
29
29
</ Container >
30
- </ div >
30
+ </ section >
31
31
) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import React from 'react';
3
3
import * as Resizer from '../../src' ;
4
4
5
5
export const MaxMinSize = ( ) => (
6
- < div >
6
+ < section >
7
7
< h2 > Max/Min size demo</ h2 >
8
8
< Resizer . Container className = "container" >
9
9
< Resizer . Section className = "section" minSize = { 150 } >
@@ -14,5 +14,5 @@ export const MaxMinSize = () => (
14
14
600px max size.
15
15
</ Resizer . Section >
16
16
</ Resizer . Container >
17
- </ div >
17
+ </ section >
18
18
) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import React from 'react';
3
3
import * as Resizer from '../../src' ;
4
4
5
5
export const NestingDemo = ( ) => (
6
- < div >
6
+ < section >
7
7
< h2 > Nesting demo</ h2 >
8
8
< Resizer . Container className = "container" >
9
9
< Resizer . Section className = "section" >
@@ -22,5 +22,5 @@ export const NestingDemo = () => (
22
22
</ Resizer . Container >
23
23
</ Resizer . Section >
24
24
</ Resizer . Container >
25
- </ div >
25
+ </ section >
26
26
) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import React from 'react';
3
3
import * as Resizer from '../../src' ;
4
4
5
5
export const ResponsiveSize = ( ) => (
6
- < div >
6
+ < section >
7
7
< h2 > responsive size demo</ h2 >
8
8
< Resizer . Container className = "container" >
9
9
< Resizer . Section className = "section" defaultSize = { 400 } >
@@ -18,5 +18,5 @@ export const ResponsiveSize = () => (
18
18
< Resizer . Bar size = { 10 } className = "bar" />
19
19
< Resizer . Section className = "section" />
20
20
</ Resizer . Container >
21
- </ div >
21
+ </ section >
22
22
) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import React from 'react';
3
3
import * as Resizer from '../../src' ;
4
4
5
5
export const Simple = ( ) => (
6
- < div >
6
+ < section >
7
7
< h2 > Simple demo</ h2 >
8
8
< Resizer . Container className = "container" >
9
9
< Resizer . Section className = "section" minSize = { 100 } />
@@ -14,5 +14,5 @@ export const Simple = () => (
14
14
< Resizer . Bar size = { 10 } className = "bar" />
15
15
< Resizer . Section className = "section" minSize = { 100 } />
16
16
</ Resizer . Container >
17
- </ div >
17
+ </ section >
18
18
) ;
Original file line number Diff line number Diff line change 1
- h2 {
2
- text-align : center ;
1
+ main {
2
+ margin : 0 10vw ;
3
+ }
4
+
5
+ section {
6
+ margin : 50px 0 ;
3
7
}
4
8
5
9
.container {
6
10
height : 50vh ;
7
- margin-bottom : 50px ;
8
11
user-select : none ;
9
12
font-size : 16px ;
10
13
font-family : sans-serif ;
You can’t perform that action at this time.
0 commit comments