mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
39 lines
1.0 KiB
JavaScript
39 lines
1.0 KiB
JavaScript
import React from 'react';
|
|
|
|
import { Empty, Table, Button } from '@douyinfe/semi-ui';
|
|
import { IconDelete, IconEdit } from '@douyinfe/semi-icons';
|
|
|
|
export default function NotificationAdapterTable({ notificationAdapter = [], onRemove, onEdit } = {}) {
|
|
return (
|
|
<Table
|
|
pagination={false}
|
|
empty={<Empty description="No Data" />}
|
|
columns={[
|
|
{
|
|
title: 'Notification Adapter Name',
|
|
dataIndex: 'name',
|
|
},
|
|
|
|
{
|
|
title: '',
|
|
dataIndex: 'tools',
|
|
render: (_, record) => {
|
|
return (
|
|
<div style={{ float: 'right' }}>
|
|
<Button
|
|
type="secondary"
|
|
icon={<IconEdit />}
|
|
onClick={() => onEdit(record.id)}
|
|
style={{ marginRight: '1rem' }}
|
|
/>
|
|
<Button type="danger" icon={<IconDelete />} onClick={() => onRemove(record.id)} />
|
|
</div>
|
|
);
|
|
},
|
|
},
|
|
]}
|
|
dataSource={notificationAdapter}
|
|
/>
|
|
);
|
|
}
|