(props)
| 11 | @DragDropContext(HTML5Backend) |
| 12 | export default class Container extends Component { |
| 13 | constructor(props) { |
| 14 | super(props); |
| 15 | this.moveCard = this.moveCard.bind(this); |
| 16 | this.state = { |
| 17 | cards: [{ |
| 18 | id: 1, |
| 19 | text: 'Write a cool JS library', |
| 20 | }, { |
| 21 | id: 2, |
| 22 | text: 'Make it generic enough', |
| 23 | }, { |
| 24 | id: 3, |
| 25 | text: 'Write README', |
| 26 | }, { |
| 27 | id: 4, |
| 28 | text: 'Create some examples', |
| 29 | }, { |
| 30 | id: 5, |
| 31 | text: 'Spam in Twitter and IRC to promote it (note that this element is taller than the others)', |
| 32 | }, { |
| 33 | id: 6, |
| 34 | text: '???', |
| 35 | }, { |
| 36 | id: 7, |
| 37 | text: 'PROFIT', |
| 38 | }], |
| 39 | }; |
| 40 | } |
| 41 | |
| 42 | moveCard(dragIndex, hoverIndex) { |
| 43 | const { cards } = this.state; |
nothing calls this directly
no outgoing calls
no test coverage detected