Skip to content

Commit b63d3e1

Browse files
docs: fix typos and grammar errors in component documentation (ant-design#57512)
* docs: fix typos and grammar errors in component documentation * Update components/date-picker/index.en-US.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: 遇见同学 <1875694521@qq.com> * Apply suggestions from code review Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: 遇见同学 <1875694521@qq.com> --------- Signed-off-by: 遇见同学 <1875694521@qq.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 0e30710 commit b63d3e1

16 files changed

Lines changed: 21 additions & 21 deletions

File tree

components/app/index.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const MyPage: React.FC = () => {
3737
modal.warning({ title: 'Good' });
3838
// ....
3939
// other message, notification, modal static function
40-
return <div>Hello word</div>;
40+
return <div>Hello world</div>;
4141
};
4242

4343
const MyApp: React.FC = () => (

components/app/index.zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const MyPage: React.FC = () => {
3838
modal.warning({ title: 'Good' });
3939
// ....
4040
// other message, notification, modal static function
41-
return <div>Hello word</div>;
41+
return <div>Hello world</div>;
4242
};
4343

4444
const MyApp: React.FC = () => (
@@ -54,7 +54,7 @@ export default MyApp;
5454

5555
### 与 ConfigProvider 先后顺序 {#sequence-with-configprovider}
5656

57-
App 组件只能在 `ConfigProvider` 之下才能使用 Design Token, 如果需要使用其样式重置能力,则 ConfigProvider 与 App 组件必须成对出现。
57+
App 组件只能在 `ConfigProvider` 之下才能使用 Design Token,如果需要使用其样式重置能力,则 ConfigProvider 与 App 组件必须成对出现。
5858

5959
```tsx
6060
<ConfigProvider theme={{ ... }}>

components/calendar/index.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Common props ref:[Common props](/docs/react/common-props)
4646
| dateFullCellRender | Customize the display of the date cell, the returned content will override the cell | function(date: Dayjs): ReactNode | - | |
4747
| fullCellRender | Customize cell content | function(current: dayjs, info: { prefixCls: string, originNode: React.ReactElement, today: dayjs, range?: 'start' \| 'end', type: PanelMode, locale?: Locale, subType?: 'hour' \| 'minute' \| 'second' \| 'meridiem' }) => React.ReactNode | - | 5.4.0 |
4848
| defaultValue | The date selected by default | [dayjs](https://day.js.org/) | - | |
49-
| disabledDate | Function that specifies the dates that cannot be selected, `currentDate` is same dayjs object as `value` prop which you shouldn't mutate it](https://github.com/ant-design/ant-design/issues/30987) | (currentDate: Dayjs) => boolean | - | |
49+
| disabledDate | Function that specifies the dates that cannot be selected, `currentDate` is same dayjs object as `value` prop which you shouldn't mutate it (https://github.com/ant-design/ant-design/issues/30987) | (currentDate: Dayjs) => boolean | - | |
5050
| fullscreen | Whether to display in full-screen | boolean | true | |
5151
| showWeek | Whether to display week number | boolean | false | 5.23.0 |
5252
| styles | Customize inline style for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), CSSProperties> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | |

components/color-picker/index.zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ type PresetColorType = {
103103
| toCssString | 转换成 CSS 支持的格式 | `() => string` | 5.20.0 |
104104
| toHex | 转换成 `hex` 格式字符,返回格式如:`1677ff` | `() => string` | - |
105105
| toHexString | 转换成 `hex` 格式颜色字符串,返回格式如:`#1677ff` | `() => string` | - |
106-
| toHsb | 转换成 `hsb` 对象 | `() => ({ h: number, s: number, b: number, a number })` | - |
106+
| toHsb | 转换成 `hsb` 对象 | `() => ({ h: number, s: number, b: number, a: number })` | - |
107107
| toHsbString | 转换成 `hsb` 格式颜色字符串,返回格式如:`hsb(215, 91%, 100%)` | `() => string` | - |
108-
| toRgb | 转换成 `rgb` 对象 | `() => ({ r: number, g: number, b: number, a number })` | - |
108+
| toRgb | 转换成 `rgb` 对象 | `() => ({ r: number, g: number, b: number, a: number })` | - |
109109
| toRgbString | 转换成 `rgb` 格式颜色字符串,返回格式如:`rgb(22, 119, 255)` | `() => string` | - |
110110

111111
## Semantic DOM

components/config-provider/index.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ const {
153153
| radio | Set Radio common props | { className?: string, style?: React.CSSProperties, classNames?: [RadioConfig\["classNames"\]](/components/radio#semantic-dom), styles?: [RadioConfig\["styles"\]](/components/radio#semantic-dom) } | - | 5.7.0, `classNames` and `styles`: 6.0.0 |
154154
| rate | Set Rate common props | { className?: string, style?: React.CSSProperties } | - | 5.7.0 |
155155
| result | Set Result common props | { className?: string, style?: React.CSSProperties , classNames?: [ResultProps\["classNames"\]](/components/result#semantic-dom), styles?: [ResultProps\["styles"\]](/components/result#semantic-dom)} | - | 5.7.0, `classNames` and `styles`: 6.0.0 |
156-
| ribbon | Set Ribbon common props | { className?: string, style?: React.CSSProperties, , classNames?: [RibbonProps\["classNames"\]](/components/badge#semantic-dom), styles?: [RibbonProps\["styles"\]](/components/badge#semantic-dom) } | - | 6.0.0 |
156+
| ribbon | Set Ribbon common props | { className?: string, style?: React.CSSProperties, classNames?: [RibbonProps\["classNames"\]](/components/badge#semantic-dom), styles?: [RibbonProps\["styles"\]](/components/badge#semantic-dom) } | - | 6.0.0 |
157157
| skeleton | Set Skeleton common props | { className?: string, style?: React.CSSProperties, classNames?: [SkeletonProps\["classNames"\]](/components/skeleton#semantic-dom), styles?: [SkeletonProps\["styles"\]](/components/skeleton#semantic-dom) } | - | 5.7.0, `classNames` and `styles`: 6.0.0 |
158158
| segmented | Set Segmented common props | { className?: string, style?: React.CSSProperties, classNames?: [SegmentedProps\["classNames"\]](/components/segmented#semantic-dom), styles?: [SegmentedProps\["styles"\]](/components/segmented#semantic-dom) } | - | 5.7.0, `classNames` and `styles`: 6.0.0 |
159159
| select | Set Select common props | { className?: string, showSearch?: boolean, style?: React.CSSProperties, classNames?: [SelectConfig\["classNames"\]](/components/select#semantic-dom), styles?: [SelectConfig\["styles"\]](/components/select#semantic-dom) } | - | 5.7.0, `classNames` and `styles`: 6.0.0 |

components/config-provider/index.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ const {
155155
| radio | 设置 Radio 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?: [RadioConfig\["classNames"\]](/components/radio-cn#semantic-dom), styles?: [RadioConfig\["styles"\]](/components/radio-cn#semantic-dom) } | - | 5.7.0, `classNames``styles`: 6.0.0 |
156156
| rate | 设置 Rate 组件的通用属性 | { className?: string, style?: React.CSSProperties } | - | 5.7.0 |
157157
| result | 设置 Result 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?: [ResultProps\["classNames"\]](/components/result-cn#semantic-dom), styles?: [ResultProps\["styles"\]](/components/result-cn#semantic-dom) } | - | 5.7.0, `classNames``styles`: 6.0.0 |
158-
| ribbon | 设置 Ribbon 组件的通用属性 | { className?: string, style?: React.CSSProperties, , classNames?: [RibbonProps\["classNames"\]](/components/badge-cn#semantic-dom), styles?: [RibbonProps\["styles"\]](/components/badge-cn#semantic-dom) } | - | 6.0.0 |
158+
| ribbon | 设置 Ribbon 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?: [RibbonProps\["classNames"\]](/components/badge-cn#semantic-dom), styles?: [RibbonProps\["styles"\]](/components/badge-cn#semantic-dom) } | - | 6.0.0 |
159159
| skeleton | 设置 Skeleton 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?: [SkeletonProps\["classNames"\]](/components/skeleton-cn#semantic-dom), styles?: [SkeletonProps\["styles"\]](/components/skeleton-cn#semantic-dom) } | - | 5.7.0, `classNames``styles`: 6.0.0 |
160160
| segmented | 设置 Segmented 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?: [SegmentedProps\["classNames"\]](/components/segmented-cn#semantic-dom), styles?: [SegmentedProps\["styles"\]](/components/segmented-cn#semantic-dom) } | - | 5.7.0, `classNames``styles`: 6.0.0 |
161161
| select | 设置 Select 组件的通用属性 | { className?: string, showSearch?: boolean, style?: React.CSSProperties, classNames?: [SelectConfig\["classNames"\]](/components/select-cn#semantic-dom), styles?: [SelectConfig\["styles"\]](/components/select-cn#semantic-dom) } | - | 5.7.0,`classNames``styles`: 6.0.0 |

components/date-picker/index.en-US.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ There are five kinds of picker:
6666

6767
The default locale is en-US, if you need to use other languages, recommend to use internationalized components provided by us at the entrance. Look at: [ConfigProvider](https://ant.design/components/config-provider/).
6868

69-
If there are special needs (only modifying single component language), Please use the property: local. Example: [default](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json).
69+
If there are special needs (only modifying single component language), Please use the property: locale. Example: [default](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json).
7070

7171
```jsx
7272
// The default locale is en-US, if you want to use other locale, just set locale in entry file globally.
@@ -96,7 +96,7 @@ The following APIs are shared by DatePicker, RangePicker.
9696
| --- | --- | --- | --- | --- |
9797
| allowClear | Customize clear button | boolean \| { clearIcon?: ReactNode } | true | 5.8.0: Support object type |
9898
| className | The picker className | string | - | |
99-
| classNames | 用于自定义组件内部各语义化结构的 class,支持对象或函数 | Record<[SemanticDOM](#semantic-dom), string> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), string> | - | |
99+
| classNames | Customize class for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), string> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), string> | - | |
100100
| dateRender | Custom rendering function for date cells, >= 5.4.0 use `cellRender` instead. | function(currentDate: dayjs, today: dayjs) => React.ReactNode | - | < 5.4.0 |
101101
| cellRender | Custom rendering function for picker cells | (current: dayjs, info: { originNode: React.ReactElement,today: DateType, range?: 'start' \| 'end', type: PanelMode, locale?: Locale, subType?: 'hour' \| 'minute' \| 'second' \| 'meridiem' }) => React.ReactNode | - | 5.4.0 |
102102
| components | Custom panels | Record<Panel \| 'input', React.ComponentType> | - | 5.14.0 |
@@ -106,7 +106,7 @@ The following APIs are shared by DatePicker, RangePicker.
106106
| format | To set the date format, support multi-format matching when it is an array, display the first one shall prevail. refer to [dayjs#format](https://day.js.org/docs/en/display/format). for example: [Custom Format](#date-picker-demo-format) | [formatType](#formattype) | [@rc-component/picker](https://github.com/react-component/picker/blob/f512f18ed59d6791280d1c3d7d37abbb9867eb0b/src/utils/uiUtil.ts#L155-L177) | |
107107
| order | Auto order date when multiple or range selection | boolean | true | 5.14.0 |
108108
| ~~popupClassName~~ | To customize the className of the popup calendar, use `classNames.popup.root` instead | string | - | 4.23.0 |
109-
| preserveInvalidOnBlur | Not clean input on blur even when the typing is invalidate | boolean | false | 5.14.0 |
109+
| preserveInvalidOnBlur | Don't clear the input on blur even when the typed value is invalid | boolean | false | 5.14.0 |
110110
| getPopupContainer | To set the container of the floating layer, while the default is to create a `div` element in `body` | function(trigger) | - | |
111111
| inputReadOnly | Set the `readonly` attribute of the input tag (avoids virtual keyboard on touch devices) | boolean | false | |
112112
| locale | Localization configuration | object | [default](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) | |
@@ -128,7 +128,7 @@ The following APIs are shared by DatePicker, RangePicker.
128128
| size | To determine the size of the input box, the height of `large` and `small`, are 40px and 24px respectively, while default size is 32px | `large` \| `medium` \| `small` | - | |
129129
| status | Set validation status | 'error' \| 'warning' | - | 4.19.0 |
130130
| style | To customize the style of the input box | CSSProperties | {} | |
131-
| styles | 用于自定义组件内部各语义化结构的行内 style,支持对象或函数 | Record<[SemanticDOM](#semantic-dom), CSSProperties> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | |
131+
| styles | Customize inline style for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), CSSProperties> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | |
132132
| suffixIcon | The custom suffix icon | ReactNode | - | |
133133
| superNextIcon | The custom super next icon | ReactNode | - | 4.17.0 |
134134
| superPrevIcon | The custom super prev icon | ReactNode | - | 4.17.0 |

components/descriptions/index.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Common props ref:[Common props](/docs/react/common-props)
8989
| ~~contentStyle~~ | Customize content style, Please use `styles.content` instead | CSSProperties | - | 4.10.0 |
9090
| extra | The action area of the description list, placed at the top-right | ReactNode | - | 4.5.0 |
9191
| items | Describe the contents of the list item | [DescriptionsItem](#descriptionitem)[] | - | 5.8.0 |
92-
| ~~labelStyle~~ | Customize label style | CSSProperties, Please use `styles.label` instead | - | 4.10.0 |
92+
| ~~labelStyle~~ | Customize label style, Please use `styles.label` instead | CSSProperties | - | 4.10.0 |
9393
| layout | Define description layout | `horizontal` \| `vertical` | `horizontal` | |
9494
| size | Set the size of the list. Can be set to `medium`,`small`, or not filled | `large` \| `medium` \| `small` | `large` | |
9595
| styles | Customize inline style for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), CSSProperties> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | |

components/grid/index.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Ant Design 的布局组件若不能满足你的需求,你也可以直接使用
8282
| lg | `窗口宽度 ≥ 992px` 响应式栅格,可为栅格数或一个包含其他属性的对象 | number \| object | - | |
8383
| xl | `窗口宽度 ≥ 1200px` 响应式栅格,可为栅格数或一个包含其他属性的对象 | number \| object | - | |
8484
| xxl | `窗口宽度 ≥ 1600px` 响应式栅格,可为栅格数或一个包含其他属性的对象 | number \| object | - | |
85-
| xxxl | `窗口宽度 ≥ 1920px` 响应式栈格,可为栈格数或一个包含其他属性的对象 | number \| object | - | 6.3.0 |
85+
| xxxl | `窗口宽度 ≥ 1920px` 响应式栅格,可为栅格数或一个包含其他属性的对象 | number \| object | - | 6.3.0 |
8686

8787
您可以使用 [主题定制](/docs/react/customize-theme-cn) 修改 `screen[XS|SM|MD|LG|XL|XXL|XXXL]` 来修改断点值(自 5.1.0 起,[codesandbox demo](https://codesandbox.io/s/antd-reproduction-template-forked-dlq3r9?file=/index.js))。
8888

components/modal/index.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ demo:
117117
| getContainer | 指定 Modal 挂载的 HTML 节点,false 为挂载在当前 dom | HTMLElement \| () => HTMLElement \| Selectors \| false | document.body | |
118118
| icon | 自定义图标 | ReactNode | &lt;ExclamationCircleFilled /> | |
119119
| keyboard | 是否支持键盘 esc 关闭 | boolean | true | |
120-
| mask | 遮罩效果 | boolean \| `{enabled?: boolean, blur?: boolean, closable?: boolean, closable?: true}` | true | |
120+
| mask | 遮罩效果 | boolean \| `{enabled?: boolean, blur?: boolean, closable?: boolean}` | true | |
121121
| ~~maskClosable~~ | 点击蒙层是否允许关闭 | boolean | false | |
122122
| okButtonProps | ok 按钮 props | [ButtonProps](/components/button-cn#api) | - | |
123123
| okText | 确认按钮文字 | string | `确定` | |

0 commit comments

Comments
 (0)