blob: b146174331609c9c160424c39c5306737dc788cb (
plain)
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
|
import React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faPlus, faCheck, faTimes } from '@fortawesome/free-solid-svg-icons'
import { Button } from 'reactstrap'
const NewRoomConstructionComponent = ({ onStart, onFinish, onCancel, currentRoomInConstruction }) => {
if (currentRoomInConstruction === '-1') {
return (
<div className="btn btn-outline-primary btn-block" onClick={onStart}>
<FontAwesomeIcon icon={faPlus} className="mr-2" />
Construct a new room
</div>
)
}
return (
<div>
<Button color="primary" block onClick={onFinish}>
<FontAwesomeIcon icon={faCheck} className="mr-2" />
Finalize new room
</Button>
<Button color="default" block onClick={onCancel}>
<FontAwesomeIcon icon={faTimes} className="mr-2" />
Cancel construction
</Button>
</div>
)
}
export default NewRoomConstructionComponent
|