@ getsoren/ 数据网
反应库数据表和数据网格
图书馆基于 MUI 十届理事会
安装
yarn add @getsoren/design-system @getsoren/data-grid
或者说
npm install @getsoren/design-system @getsoren/data-grid
使用量
import { DataGrid, DataGridProvider, GridColDef, GridRowsProp} from "@getsoren/data-grid";
const columns: GridColDef[] = [
{
field: "name",
headerName: "Name",
},
{
field: "companies",
headerName: "Companies",
},
];
const rows : GridRowsProp = [
{
companies: "Tracktor",
name: "Kevin Durant",
},
];
const App = () => (
<DataGridProvider licence={"YOUR_LICENSE_MUI"}>
<DataGrid rows={rows} columns={columns} />
</DataGridProvider>
);
附加道具
此库将所有道具从 MUI 十届理事会 并在 DataGrid 组件中添加一些道具.
| Prop | 类型 | 默认 | 说明 |
|---|---|---|---|
| 高度 | 数字 qq 字符串 | 未定义 | 设置网格高度 |
| 面板厚度 | 数字“ 自动” | 未定义 | 设置自定义面板的高度 getDetailPanelContent 提供 |
| 变体 | "外线" | 未定义 | 设定变体 |
| 上升 | 编号 | 1个 | 设定高度。 这个道具只能用到 elevation 变种. |
| nbeRowsLoading斯凯勒通 | 编号 | 第7条 | 设定装入骨架的行数 |
| 装入变量 | "斯凯莱通""线性" | "斯凯勒通" | 设置装入变体样式 |
| 正在丢失 | 布尔 | 未定义 | 装入时不使用 |