Newer
Older
import { InferType } from "prop-types";
import React from "react";
import { State } from "../state";
import { ToolButton } from "./toolbutton";
import wand from "../../images/tools/wand.png";
import "./toolpool.css";
type propTypes = {
state: State;
};
export class ToolPool extends React.PureComponent<
propTypes,
InferType<typeof ToolPool.stateTypes>
> {
static stateTypes = {};
constructor(props: propTypes) {
super(props);
}
render(): React.ReactNode {
// Don't render anything if state is not defined
// TODO: Reactivate code later. Was commented to work on the proper toolpool render
// if (!this.state) {
// return <div id="toolpool"></div>;
// }
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<ToolButton
icon={wand}
title="Example Tools"
key="1"
></ToolButton>
<ToolButton
icon={wand}
title="Example Tool"
key="2"
></ToolButton>
<ToolButton
icon={wand}
title="Example Tool"
key="3"
></ToolButton>
<ToolButton
icon={wand}
title="Example Tool"
key="4"
></ToolButton>
<ToolButton
icon={wand}
title="Example Tool"
key="5"
></ToolButton>
<ToolButton
icon={wand}
title="Example Tool"
key="6"
></ToolButton>
<ToolButton
icon={wand}
title="Example Tool"
key="7"
></ToolButton>
<ToolButton
icon={wand}
title="Example Tool"
key="8"
></ToolButton>
<ToolButton
icon={wand}
title="Example Tool"
key="9"
></ToolButton>
{/* {this.props.state.display.tools.map((t) => (
<ToolButton
tool={t}
state={this.props.state}
key={t.getKey()}
/>