Skip to content

Commit f5153ab

Browse files
authored
docs: improve style type (ant-design#23700)
1 parent 3967f12 commit f5153ab

26 files changed

+66
-65
lines changed

Diff for: components/card/index.en-US.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ A card can be used to display content related to a single subject. The content c
2323
| --- | --- | --- | --- | --- |
2424
| actions | The action list, shows at the bottom of the Card. | Array<ReactNode> | - | |
2525
| activeTabKey | Current TabPane's key | string | - | |
26-
| headStyle | Inline style to apply to the card head | object | - | |
27-
| bodyStyle | Inline style to apply to the card content | object | - | |
26+
| headStyle | Inline style to apply to the card head | CSSProperties | - | |
27+
| bodyStyle | Inline style to apply to the card content | CSSProperties | - | |
2828
| bordered | Toggles rendering of the border around the card | boolean | `true` | |
2929
| cover | Card cover | ReactNode | - | |
3030
| defaultActiveTabKey | Initial active TabPane's key, if `activeTabKey` is not set. | string | - | |
@@ -41,18 +41,18 @@ A card can be used to display content related to a single subject. The content c
4141

4242
### Card.Grid
4343

44-
| Property | Description | Type | Default | Version |
45-
| --------- | ------------------------------- | ------- | ------- | ------- |
46-
| className | className of container | string | - | |
47-
| hoverable | Lift up when hovering card grid | boolean | true | |
48-
| style | style object of container | object | - | |
44+
| Property | Description | Type | Default | Version |
45+
| --------- | ------------------------------- | ------------- | ------- | ------- |
46+
| className | className of container | string | - | |
47+
| hoverable | Lift up when hovering card grid | boolean | true | |
48+
| style | style object of container | CSSProperties | - | |
4949

5050
### Card.Meta
5151

52-
| Property | Description | Type | Default | Version |
53-
| ----------- | ------------------------- | --------- | ------- | ------- |
54-
| avatar | avatar or icon | ReactNode | - | |
55-
| className | className of container | string | - | |
56-
| description | description content | ReactNode | - | |
57-
| style | style object of container | object | - | |
58-
| title | title content | ReactNode | - | |
52+
| Property | Description | Type | Default | Version |
53+
| ----------- | ------------------------- | ------------- | ------- | ------- |
54+
| avatar | avatar or icon | ReactNode | - | |
55+
| className | className of container | string | - | |
56+
| description | description content | ReactNode | - | |
57+
| style | style object of container | CSSProperties | - | |
58+
| title | title content | ReactNode | - | |

Diff for: components/card/index.zh-CN.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ cols: 1
2424
| --- | --- | --- | --- | --- |
2525
| actions | 卡片操作组,位置在卡片底部 | Array<ReactNode> | - | |
2626
| activeTabKey | 当前激活页签的 key | string | - | |
27-
| headStyle | 自定义标题区域样式 | object | - | |
28-
| bodyStyle | 内容区域自定义样式 | object | - | |
27+
| headStyle | 自定义标题区域样式 | CSSProperties | - | |
28+
| bodyStyle | 内容区域自定义样式 | CSSProperties | - | |
2929
| bordered | 是否有边框 | boolean | true | |
3030
| cover | 卡片封面 | ReactNode | - | |
3131
| defaultActiveTabKey | 初始化选中页签的 key,如果没有设置 activeTabKey | string | 第一个页签 | |
@@ -42,18 +42,18 @@ cols: 1
4242

4343
### Card.Grid
4444

45-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
46-
| --------- | ---------------------- | ------- | ------ | ---- |
47-
| className | 网格容器类名 | string | - | |
48-
| hoverable | 鼠标移过时可浮起 | boolean | true | |
49-
| style | 定义网格容器类名的样式 | object | - | |
45+
| 参数 | 说明 | 类型 | 默认值 | 版本 |
46+
| --------- | ---------------------- | ------------- | ------ | ---- |
47+
| className | 网格容器类名 | string | - | |
48+
| hoverable | 鼠标移过时可浮起 | boolean | true | |
49+
| style | 定义网格容器类名的样式 | CSSProperties | - | |
5050

5151
### Card.Meta
5252

53-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
54-
| ----------- | ------------------ | --------- | ------ | ---- |
55-
| avatar | 头像/图标 | ReactNode | - | |
56-
| className | 容器类名 | string | - | |
57-
| description | 描述内容 | ReactNode | - | |
58-
| style | 定义容器类名的样式 | object | - | |
59-
| title | 标题内容 | ReactNode | - | |
53+
| 参数 | 说明 | 类型 | 默认值 | 版本 |
54+
| ----------- | ------------------ | ------------- | ------ | ---- |
55+
| avatar | 头像/图标 | ReactNode | - | |
56+
| className | 容器类名 | string | - | |
57+
| description | 描述内容 | ReactNode | - | |
58+
| style | 定义容器类名的样式 | CSSProperties | - | |
59+
| title | 标题内容 | ReactNode | - | |

Diff for: components/cascader/index.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Cascade selection box.
4040
| popupVisible | set visible of cascader popup | boolean | - | |
4141
| showSearch | Whether show search input in single mode. | boolean\|object | false | |
4242
| size | input size | `large` \| `middle` \| `small` | | |
43-
| style | additional style | string | - | |
43+
| style | additional style | CSSProperties | - | |
4444
| suffixIcon | The custom suffix icon | ReactNode | - | |
4545
| value | selected value | string\[] | - | |
4646
| onChange | callback when finishing cascader select | `(value, selectedOptions) => void` | - | |

Diff for: components/cascader/index.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ subtitle: 级联选择
4141
| popupVisible | 控制浮层显隐 | boolean | - | |
4242
| showSearch | 在选择框中显示搜索框 | boolean | false | |
4343
| size | 输入框大小 | `large` \| `middle` \| `small` || |
44-
| style | 自定义样式 | string | - | |
44+
| style | 自定义样式 | CSSProperties | - | |
4545
| suffixIcon | 自定义的选择框后缀图标 | ReactNode | - | |
4646
| value | 指定选中项 | string\[] | - | |
4747
| onChange | 选择完成后的回调 | `(value, selectedOptions) => void` | - | |

Diff for: components/date-picker/index.en-US.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ The following APIs are shared by DatePicker, YearPicker, MonthPicker, RangePicke
5959
| open | open state of picker | boolean | - | |
6060
| picker | Set picker type | `date` \| `week` \| `month` \| `quarter` (4.1.0) \| `year` | `date` | |
6161
| placeholder | placeholder of date input | string\|RangePicker\[] | - | |
62-
| popupStyle | to customize the style of the popup calendar | object | {} | |
62+
| popupStyle | to customize the style of the popup calendar | CSSProperties | {} | |
6363
| size | determine the size of the input box, the height of `large` and `small`, are 40px and 24px respectively, while default size is 32px | `large` \| `middle` \| `small` | - | |
6464
| bordered | whether has border style | Boolean | true | |
6565
| suffixIcon | The custom suffix icon | ReactNode | - | |
66-
| style | to customize the style of the input box | object | {} | |
66+
| style | to customize the style of the input box | CSSProperties | {} | |
6767
| onOpenChange | a callback function, can be executed whether the popup calendar is popped up or closed | function(open) | - | |
6868
| onPanelChange | callback when picker panel mode is changed | function(value, mode) | - | |
6969
| inputReadOnly | Set the `readonly` attribute of the input tag (avoids virtual keyboard on touch devices) | boolean | false | |

Diff for: components/date-picker/index.zh-CN.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ import 'moment/locale/zh-cn';
6161
| open | 控制弹层是否展开 | boolean | - | |
6262
| picker | 设置选择器类型 | `date` \| `week` \| `month` \| `quarter` (4.1.0) \| `year` | `date` | |
6363
| placeholder | 输入框提示文字 | string\|RangePicker\[] | - | |
64-
| popupStyle | 额外的弹出日历样式 | object | {} | |
64+
| popupStyle | 额外的弹出日历样式 | CSSProperties | {} | |
6565
| size | 输入框大小,`large` 高度为 40px,`small` 为 24px,默认是 32px | `large` \| `middle` \| `small` || |
6666
| bordered | 是否有边框 | Boolean | true | |
6767
| suffixIcon | 自定义的选择框后缀图标 | ReactNode | - | |
68-
| style | 自定义输入框样式 | object | {} | |
68+
| style | 自定义输入框样式 | CSSProperties | {} | |
6969
| onOpenChange | 弹出日历和关闭日历的回调 | function(open) || |
7070
| onPanelChange | 日历面板切换的回调 | function(value, mode) | - | |
7171
| inputReadOnly | 设置输入框为只读(避免在移动设备上打开虚拟键盘) | boolean | false | |

Diff for: components/divider/index.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ A divider line separates different content.
2121
| className | className of container | string | - | |
2222
| dashed | whether line is dashed | boolean | false | |
2323
| orientation | position of title inside divider | `left` \| `right` \| `center` | `center` | |
24-
| style | style object of container | object | - | |
24+
| style | style object of container | CSSProperties | - | |
2525
| type | direction type of divider | `horizontal` \| `vertical` | `horizontal` | |

Diff for: components/divider/index.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ subtitle: 分割线
1919
| className | 分割线样式类 | string | - | |
2020
| dashed | 是否虚线 | boolean | false | |
2121
| orientation | 分割线标题的位置 | `left` \| `right` \| `center` | `center` | |
22-
| style | 分割线样式对象 | object | - | |
22+
| style | 分割线样式对象 | CSSProperties | - | |
2323
| type | 水平还是垂直类型 | `horizontal` \| `vertical` | `horizontal` | |

Diff for: components/drawer/index.en-US.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ A Drawer is a panel that is typically overlaid on top of a page and slides in fr
2121
| --- | --- | --- | --- |
2222
| closable | Whether a close (x) button is visible on top right of the Drawer dialog or not. | boolean | true |
2323
| destroyOnClose | Whether to unmount child components on closing drawer or not. | boolean | false |
24-
| forceRender | Prerender Drawer component forcely | boolean | false |
24+
| forceRender | Prerender Drawer component forcely | boolean | false |
2525
| getContainer | Return the mounted node for Drawer. | HTMLElement \| `() => HTMLElement` \| Selectors \| false | 'body' |
2626
| mask | Whether to show mask or not. | Boolean | true |
2727
| maskClosable | Clicking on the mask (area outside the Drawer) to close the Drawer or not. | boolean | true |
28-
| maskStyle | Style for Drawer's mask element. | object | {} |
29-
| style | Style of wrapper element which **contains mask** compare to `drawerStyle` | object | - |
28+
| maskStyle | Style for Drawer's mask element. | CSSProperties | {} |
29+
| style | Style of wrapper element which **contains mask** compare to `drawerStyle` | CSSProperties | - |
3030
| drawerStyle | Style of the popup layer element | object | - |
3131
| headerStyle | Style of the drawer header part | object | - |
3232
| bodyStyle | Style of the drawer content part | object | - |

Diff for: components/drawer/index.zh-CN.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ title: Drawer
2424
| getContainer | 指定 Drawer 挂载的 HTML 节点, false 为挂载在当前 dom | HTMLElement \| `() => HTMLElement` \| Selectors \| false | 'body' |
2525
| maskClosable | 点击蒙层是否允许关闭 | boolean | true |
2626
| mask | 是否展示遮罩 | boolean | true |
27-
| maskStyle | 遮罩样式 | object | {} |
28-
| style | 可用于设置 Drawer 最外层容器的样式,和 `drawerStyle` 的区别是作用节点包括 `mask` | object | - |
29-
| drawerStyle | 用于设置 Drawer 弹出层的样式 | object | - |
30-
| headerStyle | 用于设置 Drawer 头部的样式 | object | - |
31-
| bodyStyle | 可用于设置 Drawer 内容部分的样式 | object | - |
27+
| maskStyle | 遮罩样式 | CSSProperties | {} |
28+
| style | 可用于设置 Drawer 最外层容器的样式,和 `drawerStyle` 的区别是作用节点包括 `mask` | CSSProperties | - |
29+
| drawerStyle | 用于设置 Drawer 弹出层的样式 | CSSProperties | - |
30+
| headerStyle | 用于设置 Drawer 头部的样式 | CSSProperties | - |
31+
| bodyStyle | 可用于设置 Drawer 内容部分的样式 | CSSProperties | - |
3232
| title | 标题 | string \| ReactNode | - |
3333
| visible | Drawer 是否可见 | boolean | - |
3434
| width | 宽度 | string \| number | 256 |

Diff for: components/layout/index.en-US.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ The wrapper.
7777
| --- | --- | --- | --- |
7878
| className | container className | string | - |
7979
| hasSider | whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering | boolean | - |
80-
| style | to customize the styles | object | - |
80+
| style | to customize the styles | CSSProperties | - |
8181

8282
> APIs of `Layout.Header` `Layout.Footer` `Layout.Content` are the same as that of `Layout`.
8383
@@ -94,7 +94,7 @@ The sidebar.
9494
| collapsible | whether can be collapsed | boolean | false |
9595
| defaultCollapsed | to set the initial status | boolean | false |
9696
| reverseArrow | reverse direction of arrow, for a sider that expands from the right | boolean | false |
97-
| style | to customize the styles | object | - |
97+
| style | to customize the styles | CSSProperties | - |
9898
| theme | color theme of the sidebar | `light` \| `dark` | `dark` |
9999
| trigger | specify the customized trigger, set to null to hide the trigger | string\|ReactNode | - |
100100
| width | width of the sidebar | number\|string | 200 |

Diff for: components/layout/index.zh-CN.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ title: Layout
7878
| --- | --- | --- | --- |
7979
| className | 容器 className | string | - |
8080
| hasSider | 表示子元素里有 Sider,一般不用指定。可用于服务端渲染时避免样式闪动 | boolean | - |
81-
| style | 指定样式 | object | - |
81+
| style | 指定样式 | CSSProperties | - |
8282

8383
> `Layout.Header` `Layout.Footer` `Layout.Content` API 与 `Layout` 相同
8484
@@ -95,7 +95,7 @@ title: Layout
9595
| collapsible | 是否可收起 | boolean | false |
9696
| defaultCollapsed | 是否默认收起 | boolean | false |
9797
| reverseArrow | 翻转折叠提示箭头的方向,当 Sider 在右边时可以使用 | boolean | false |
98-
| style | 指定样式 | object | - |
98+
| style | 指定样式 | CSSProperties | - |
9999
| theme | 主题颜色 | `light` \| `dark` | `dark` |
100100
| trigger | 自定义 trigger,设置为 null 时隐藏 trigger | string\|ReactNode | - |
101101
| width | 宽度 | number\|string | 200 |

Diff for: components/menu/index.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ More layouts with navigation: [Layout](/components/layout).
3838
| openKeys | Array with the keys of currently opened sub-menus | string\[] | | |
3939
| selectable | Allows selecting menu items | boolean | true | |
4040
| selectedKeys | Array with the keys of currently selected menu items | string\[] | | |
41-
| style | Style of the root node | object | | |
41+
| style | Style of the root node | CSSProperties | | |
4242
| subMenuCloseDelay | Delay time to hide submenu when mouse leaves (in seconds) | number | 0.1 | |
4343
| subMenuOpenDelay | Delay time to show submenu when mouse enters, (in seconds) | number | 0 | |
4444
| theme | Color theme of the menu | `light` \| `dark` | `light` | |

Diff for: components/menu/index.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ subtitle: 导航菜单
3939
| openKeys | 当前展开的 SubMenu 菜单项 key 数组 | string\[] | | |
4040
| selectable | 是否允许选中 | boolean | true | |
4141
| selectedKeys | 当前选中的菜单项 key 数组 | string\[] | | |
42-
| style | 根节点样式 | object | | |
42+
| style | 根节点样式 | CSSProperties | | |
4343
| subMenuCloseDelay | 用户鼠标离开子菜单后关闭延时,单位:秒 | number | 0.1 | |
4444
| subMenuOpenDelay | 用户鼠标进入子菜单后开启延时,单位:秒 | number | 0 | |
4545
| theme | 主题颜色 | `light` \| `dark` | `light` | |

Diff for: components/modal/index.en-US.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ When requiring users to interact with the application, but without jumping to a
1515
| Property | Description | Type | Default |
1616
| --- | --- | --- | --- |
1717
| afterClose | Specify a function that will be called when modal is closed completely. | function | - |
18-
| bodyStyle | Body style for modal body element. Such as height, padding etc. | object | {} |
18+
| bodyStyle | Body style for modal body element. Such as height, padding etc. | CSSProperties | {} |
1919
| cancelText | Text of the Cancel button | string\|ReactNode | `Cancel` |
2020
| centered | Centered Modal | Boolean | `false` |
2121
| closable | Whether a close (x) button is visible on top right of the modal dialog or not | boolean | true |
@@ -32,7 +32,7 @@ When requiring users to interact with the application, but without jumping to a
3232
| okType | Button `type` of the OK button | string | `primary` |
3333
| okButtonProps | The ok button props | [ButtonProps](/components/button) | - |
3434
| cancelButtonProps | The cancel button props | [ButtonProps](/components/button) | - |
35-
| style | Style of floating layer, typically used at least for adjusting the position. | object | - |
35+
| style | Style of floating layer, typically used at least for adjusting the position. | CSSProperties | - |
3636
| title | The modal dialog's title | string\|ReactNode | - |
3737
| visible | Whether the modal dialog is visible or not | boolean | false |
3838
| width | Width of the modal dialog | string\|number | 520 |

Diff for: components/modal/index.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ title: Modal
3636
| okType | 确认按钮类型 | string | primary |
3737
| okButtonProps | ok 按钮 props | [ButtonProps](/components/button) | - |
3838
| cancelButtonProps | cancel 按钮 props | [ButtonProps](/components/button) | - |
39-
| style | 可用于设置浮层的样式,调整浮层位置等 | object | - |
39+
| style | 可用于设置浮层的样式,调整浮层位置等 | CSSProperties | - |
4040
| title | 标题 | string\|ReactNode | - |
4141
| visible | 对话框是否可见 | boolean | - |
4242
| width | 宽度 | string\|number | 520 |

Diff for: components/rate/index.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Rate component.
2323
| count | star count | number | 5 |
2424
| defaultValue | default value | number | 0 |
2525
| disabled | read only, unable to interact | boolean | false |
26-
| style | custom style object of rate | object | |
26+
| style | custom style object of rate | CSSProperties | |
2727
| tooltips | Customize tooltip by each character | string\[] | |
2828
| value | current value | number | |
2929
| onBlur | callback when component lose focus | Function() | |

Diff for: components/rate/index.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ title: Rate
2424
| count | star 总数 | number | 5 |
2525
| defaultValue | 默认值 | number | 0 |
2626
| disabled | 只读,无法进行交互 | boolean | false |
27-
| style | 自定义样式对象 | object | |
27+
| style | 自定义样式对象 | CSSProperties | |
2828
| tooltips | 自定义每项的提示信息 | string\[] | |
2929
| value | 当前数,受控值 | number | |
3030
| onBlur | 失去焦点时的回调 | Function() | |

0 commit comments

Comments
 (0)