mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-23 18:50:06 +08:00
Page:
Document types conventions
Pages
API Naming rules
Ant Design 设计基础简版
CSS in JS 迁移指南
Code convention for antd
Collaborators
Configuration for Documentation and Demo
Cookbook
Development
Document types conventions
FAQ
Home
PR principle
PR 规范
Template for Bug Report in IE8 9
Unique Panel Component
v5 API 废弃流程
什么是最小化重现,为什么这是必需的?
老版本和beta版本文档发布流程
设计文档上传流程
轮值规则和版本发布流程
Table of Contents
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Follows TypeScript's type style.
Lowercase type names:
boolean
for boolean values;string
for string values;string[]
orArray<string>
for array values;number
for number values;any
for any value;object
for plain objects;
Function
(selectedRowKeys: string[], selectedRows: <T>[]) => any
Array
string[]
// element has multiple types
Array<string|number>
Enum
'primary'|'ghost'|'dashed'
Using |
for multiple types:
Markdown requires \
to escape |
in table.
boolean\|number
If a prop accepts any kind of React node:
string|ReactNode
If a prop only accepts string or a single React element:
string|ReactElement
If a prop only accepts specific element:
Menu.Item
// for array
Menu.Item[]
If a prop only accepts specific element with specific props:
ReactElement<InputProps>
Link to a inner type
- Get type's permanent link:
1bf0bab2a7/components/cascader/index.tsx (L9)
- Use https://git.io shorten url
[CascaderOptionType](https://git.io/vMMoK)[]
- Home
- Cookbook
- FAQ
- Template for Bug Report in IE8 9
- Contributing
- Maintaining
- Design