2020-07-07 08:35:49 +03:00
|
|
|
import * as React from "react";
|
|
|
|
import * as Constants from "~/common/constants";
|
|
|
|
|
2020-07-21 03:05:45 +03:00
|
|
|
import { Table } from "~/components/system/components/Table";
|
2020-07-07 08:35:49 +03:00
|
|
|
import { css } from "@emotion/react";
|
|
|
|
|
2020-07-07 11:03:45 +03:00
|
|
|
const STYLES_CONTAINER = css`
|
2020-07-10 08:03:37 +03:00
|
|
|
font-family: ${Constants.font.text};
|
|
|
|
box-sizing: border-box;
|
2020-07-07 11:03:45 +03:00
|
|
|
border-radius: 4px;
|
|
|
|
background-color: ${Constants.system.white};
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
|
|
|
border: 1px solid ${Constants.system.border};
|
|
|
|
width: 100%;
|
|
|
|
`;
|
|
|
|
|
2020-07-07 08:35:49 +03:00
|
|
|
export const PeersList = (props) => {
|
2020-07-07 11:03:45 +03:00
|
|
|
return (
|
|
|
|
<div css={STYLES_CONTAINER}>
|
2020-07-20 10:07:21 +03:00
|
|
|
<Table
|
2020-07-07 11:03:45 +03:00
|
|
|
data={{
|
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
key: "id",
|
|
|
|
width: "144px",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: "name",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
rows: props.data,
|
|
|
|
}}
|
|
|
|
selectedRowId={props.selectedRowId}
|
|
|
|
onChange={props.onChange}
|
|
|
|
name={props.name}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
);
|
2020-07-07 08:35:49 +03:00
|
|
|
};
|