20 lines
681 B
JavaScript
20 lines
681 B
JavaScript
import React from 'react';
|
|
import {Table, Button} from 'semantic-ui-react';
|
|
|
|
const AIOListItem = ({i18n, data, editAIO, delAIO}) => {
|
|
|
|
return (
|
|
<Table.Row>
|
|
<Table.Cell>{data.name || ''}</Table.Cell>
|
|
<Table.Cell>{data.portnum || ''}</Table.Cell>
|
|
<Table.Cell>{data.range_min || 0} ~ {data.range_max || 0}</Table.Cell>
|
|
<Table.Cell>{data.scale_min || 0} ~ {data.scale_max || 0}</Table.Cell>
|
|
<Table.Cell>
|
|
<Button type="button" basic size="tiny" content="Edit" onClick={()=>{editAIO(1, data)}} />
|
|
<Button type="button" basic size="tiny" content="Delete" onClick={()=>{delAIO(data.uid || '')}} />
|
|
</Table.Cell>
|
|
</Table.Row>
|
|
)
|
|
}
|
|
|
|
export default AIOListItem; |