diff --git a/API-Naming-rules.md b/API-Naming-rules.md new file mode 100644 index 0000000..9766bfd --- /dev/null +++ b/API-Naming-rules.md @@ -0,0 +1,28 @@ +Basically, antd naming requires **FULL NAME** instead of Abbreviation. + +## Props +* Initialize prop: `default` + `PropName` +* Force render: `forceRender` + * Force render sub component: `force` + `Sub Component Name` + `Render` +* Data Source: `dataSource` +* `children`: + * Mainly display content. To avoid additional prop name. + * Option list like `Select.Option` or `Tree.TreeNode`. + * Customize wrapped component can consider use `component` prop if `children` may have other usage in future. +* Display related naming: `show` + `PropName` +* Functional: `PropName` + `able` +* Disable: `disabled` + * sub component: `disabled` + `Sub Component Name` +* mainly icon: `icon` + * Multiple icons: `FunctionName` + `Icon` +* Trigger: `trigger` + * Sub function trigger: `Sub Function` + `Trigger` + * Trigger on the time point: `xxx` + `On` + `EventName` (e.g. `destroyOnClose`) + +## Event +* Trigger event: `on` + `EventName` +* Before trigger event: `before` + `EventName` +* After trigger event: `after` + `EventName` + +## Current listing api +ref: [#16048](https://github.com/ant-design/ant-design/issues/16048) \ No newline at end of file