-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListbox.js
More file actions
30 lines (23 loc) · 773 Bytes
/
Listbox.js
File metadata and controls
30 lines (23 loc) · 773 Bytes
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
import React from 'react';
const Listbox = props => {
const clicked = e => {
e.preventDefault();
props.clicked(e.target.id);
}
return (
<div className="col-sm-6 px-0">
<div className="list-group">
{
props.items.map((item, idx) =>
<button key={idx}
onClick={clicked}
className="list-group-item list-group-item-action list-group-item-light"
id={item.track.id}>
{item.track.name}
</button>)
}
</div>
</div>
);
}
export default Listbox;