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.
30 lines
558 B
30 lines
558 B
import { Table, Typography } from "antd"; |
|
|
|
const { Title } = Typography; |
|
|
|
export default function KeyValueTable({ title, data }: KeyValueTableProps) { |
|
const columns = [ |
|
{ |
|
title: "Name", |
|
dataIndex: "name", |
|
key: "name", |
|
}, |
|
{ |
|
title: "Value", |
|
dataIndex: "value", |
|
key: "value", |
|
}, |
|
]; |
|
|
|
return ( |
|
<> |
|
<Title level={2}>{title}</Title> |
|
<Table pagination={false} columns={columns} dataSource={data} rowKey="name" /> |
|
</> |
|
); |
|
} |
|
|
|
interface KeyValueTableProps { |
|
title: string, |
|
data: any, |
|
}; |