mirror of https://github.com/trezor/trezor-wallet
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.2 KiB
35 lines
1.2 KiB
import React, { Component } from 'react';
|
|
import styled from 'styled-components';
|
|
import { getStatus } from 'utils/device';
|
|
|
|
const Wrapper = styled.div``;
|
|
|
|
class DeviceList extends Component {
|
|
render() {
|
|
return (
|
|
<Wrapper>
|
|
{this.props.devices.map((device, index) => (
|
|
<div
|
|
key={index}
|
|
onClick={() => this.props.onSelectDevice(device)}
|
|
>
|
|
<div className="label-container">
|
|
<span className="label">{device.instanceLabel}</span>
|
|
<span className="status">{getStatus(device)}</span>
|
|
</div>
|
|
<div
|
|
className="forget-button"
|
|
onClick={(event) => {
|
|
event.stopPropagation();
|
|
event.preventDefault();
|
|
this.onDeviceMenuClick({ type: 'forget', label: '' }, device);
|
|
}}
|
|
/>
|
|
</div>
|
|
))}
|
|
</Wrapper>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default DeviceList; |