---
title: 网格
group:
  path: /Basic
  title: 基础组件
---

## 按钮

```jsx
import React from 'react';
import { Grid } from '@dndc/pudge-basic';
import '@dndc/pudge-basic/es/button/editor';
const props = {};
const style = {};
const data = {
  type: 'Grid',
  props: {
    cells: [{}, {}, {}],
    rowCells: 3,
    gutter: [5, 5],
  },
  style,
};
export default () => <Grid data={data} />;
```

### 1.可配置 style, 默认样式配置:

| 属性            | 说明         | 类型  | 默认值               | 版本  |
| --------------- | ------------ | ----- | -------------------- | ----- |
| width           | 宽度         | strig | 200px                | 1.0.0 |
| height          | 高度         | strig | 44px                 | 1.0.0 |
| backgroundColor | 背景颜色     | strig | primaryColor(主题色) | 1.0.0 |
| borderWidth     | 边框宽度     | strig | 1px                  | 1.0.0 |
| borderColor     | 边框颜色     | strig | rgb(24, 144, 255)    | 1.0.0 |
| color           | 颜色         | strig | #fff                 | 1.0.0 |
| hoverColor      | 鼠标聚焦颜色 | strig | #fff                 | 1.0.0 |
| activeColor     | 鼠标点击颜色 | strig | #fff                 | 1.0.0 |
| fontSize        | 字体带下     | strig | 16px                 | 1.0.0 |

example

```json
 style: {
      width: '200px',
      backgroundColor: primaryColor,
      borderWidth: '1px',
      borderColor: 'rgb(24, 144, 255)',
      color: '#fff',
      margin: ['0px', '0px', '0px', '0px'],
      hoverColor: '#fff',
      activeColor: '#fff',
      fontSize: '16px',
      height: '44px',
    }
```

### 2.默认数据配置:

| 属性 | 说明 | 类型  | 默认值 | 版本  |
| ---- | ---- | ----- | ------ | ----- |
| text | 文字 | strig | 按钮   | 1.0.0 |
| href | 链接 | strig |        | 1.0.0 |

example

```json
 props: {
      text: '按钮',
      href: '',
    }
```

### 3.事件 API:

| 属性    | 说明 | 类型 | 版本  |
| ------- | ---- | ---- | ----- |
| onClick | 点击 | Fun  | 1.0.0 |
