Lamassu admin server initial commit

This commit is contained in:
Rafael Taranto 2019-03-12 10:49:09 -03:00 committed by Rafael Taranto
parent d083ae5a40
commit fc1951c4b2
158 changed files with 28462 additions and 1606 deletions

View file

@ -0,0 +1,32 @@
import React from 'react'
import { startCase } from 'lodash/fp'
import {
Td,
THead,
TBody,
Table
} from '../fake-table/Table'
import ERow from './Row'
const ETable = ({ elements = [], data = [], cancel, save, components = {} }) => {
const { row } = components
const Row = row || ERow
return (
<Table>
<THead>
{elements.map(({ name, size, header }, idx) => (
<Td header key={idx} size={size}>{header || startCase(name)}</Td>
))}
<Td header size={175} />
</THead>
<TBody>
{data.map((it, idx) => <Row key={idx} value={it} elements={elements} cancel={cancel} save={save} />)}
</TBody>
</Table>
)
}
export default ETable