Just wondering how I can go about doing this more efficiently/make it more visually appealing to the user?
switch (this.state.selected) {
case "all":
styled = this.state.allKeywords.map(keyword =>
<div style={{display: "flex", flexDirection: "row"}}>
<Input key={Math.random} style={{height: "45px", marginBottom: "20px"}} onClick={this.onKeywordClick} value={keyword} onChange={this.onKeywordChange}></Input>
<Button key={Math.random} onClick={() => this.deleteKeyword(keyword)} style={{height: "45px", marginLeft: "30px"}}>Delete</Button>
</div>
);
break;
case "positive":
styled = this.state.positive.map(keyword =>
<div style={{display: "flex", flexDirection: "row"}}>
<Input key={Math.random} style={{height: "45px", marginBottom: "20px"}} onClick={this.onKeywordClick} value={keyword} onChange={this.onKeywordChange}></Input>
<Button key={Math.random} onClick={() => this.deleteKeyword(keyword)} style={{height: "45px", marginLeft: "30px"}}>Delete</Button>
</div>
);
break;
case "negative":
styled = this.state.negative.map(keyword =>
<div style={{display: "flex", flexDirection: "row"}}>
<Input key={Math.random} style={{height: "45px", marginBottom: "20px"}} onClick={this.onKeywordClick} value={keyword} onChange={this.onKeywordChange}></Input>
<Button key={Math.random} onClick={() => this.deleteKeyword(keyword)} style={{height: "45px", marginLeft: "30px"}}>Delete</Button>
</div>
);
break;
default:
console.log("No keyword list mapped");
}