forked from liangklfangl/react-article-bucket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContainer.js
33 lines (31 loc) · 1.02 KB
/
Container.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import React, { Component } from 'react';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import SourceBox from './SourceBox';
import TargetBox from './TargetBox';
import Colors from './Colors';
@DragDropContext(HTML5Backend)
export default class Container extends Component {
render() {
return (
<div style={{ overflow: 'hidden', clear: 'both', margin: '-.5rem' }}>
<div style={{ float: 'left' }}>
<SourceBox color={Colors.BLUE}>
{/*上面是YELLOW*/}
<SourceBox color={Colors.YELLOW}>
<SourceBox color={Colors.YELLOW} />
<SourceBox color={Colors.BLUE} />
</SourceBox>
{/*下面是BLUE*/}
<SourceBox color={Colors.BLUE}>
<SourceBox color={Colors.YELLOW} />
</SourceBox>
</SourceBox>
</div>
<div style={{ float: 'left', marginLeft: '5rem', marginTop: '.5rem' }}>
<TargetBox />
</div>
</div>
);
}
}