Skip to content

Commit f733762

Browse files
committed
docs: update readme api
1 parent f823002 commit f733762

File tree

1 file changed

+28
-169
lines changed

1 file changed

+28
-169
lines changed

README.md

Lines changed: 28 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -54,175 +54,34 @@ ReactDOM.render(
5454

5555
### rc-dialog
5656

57-
58-
<table class="table table-bordered table-striped">
59-
<thead>
60-
<tr>
61-
<th style="width: 100px;">name</th>
62-
<th style="width: 50px;">type</th>
63-
<th>default</th>
64-
<th>description</th>
65-
</tr>
66-
</thead>
67-
<tbody>
68-
<tr>
69-
<td>prefixCls</td>
70-
<td>String</td>
71-
<td>rc-dialog</td>
72-
<td>The dialog dom node's prefixCls</td>
73-
</tr>
74-
<tr>
75-
<td>className</td>
76-
<td>String</td>
77-
<td></td>
78-
<td>additional className for dialog</td>
79-
</tr>
80-
<tr>
81-
<td>wrapClassName</td>
82-
<td>String</td>
83-
<td></td>
84-
<td>additional className for dialog wrap</td>
85-
</tr>
86-
<tr>
87-
<td>style</td>
88-
<td>Object</td>
89-
<td>{}</td>
90-
<td>Root style for dialog element.Such as width, height</td>
91-
</tr>
92-
<tr>
93-
<td>zIndex</td>
94-
<td>Number</td>
95-
<td></td>
96-
<td></td>
97-
</tr>
98-
<tr>
99-
<td>bodyStyle</td>
100-
<td>Object</td>
101-
<td>{}</td>
102-
<td>body style for dialog body element.Such as height</td>
103-
</tr>
104-
<tr>
105-
<td>maskStyle</td>
106-
<td>Object</td>
107-
<td>{}</td>
108-
<td>style for mask element.</td>
109-
</tr>
110-
<tr>
111-
<td>visible</td>
112-
<td>Boolean</td>
113-
<td>false</td>
114-
<td>current dialog's visible status</td>
115-
</tr>
116-
<tr>
117-
<td>animation</td>
118-
<td>String</td>
119-
<td></td>
120-
<td>part of dialog animation css class name</td>
121-
</tr>
122-
<tr>
123-
<td>maskAnimation</td>
124-
<td>String</td>
125-
<td></td>
126-
<td>part of dialog's mask animation css class name</td>
127-
</tr>
128-
<tr>
129-
<td>transitionName</td>
130-
<td>String</td>
131-
<td></td>
132-
<td>dialog animation css class name</td>
133-
</tr>
134-
<tr>
135-
<td>maskTransitionName</td>
136-
<td>String</td>
137-
<td></td>
138-
<td>mask animation css class name</td>
139-
</tr>
140-
<tr>
141-
<td>title</td>
142-
<td>String|React.Element</td>
143-
<td></td>
144-
<td>Title of the dialog</td>
145-
</tr>
146-
<tr>
147-
<td>footer</td>
148-
<td>React.Element</td>
149-
<td></td>
150-
<td>footer of the dialog</td>
151-
</tr>
152-
<tr>
153-
<td>closable</td>
154-
<td>Boolean</td>
155-
<td>true</td>
156-
<td>whether show close button</td>
157-
</tr>
158-
<tr>
159-
<td>mask</td>
160-
<td>Boolean</td>
161-
<td>true</td>
162-
<td>whether show mask</td>
163-
</tr>
164-
<tr>
165-
<td>maskClosable</td>
166-
<td>Boolean</td>
167-
<td>true</td>
168-
<td>whether click mask to close</td>
169-
</tr>
170-
<tr>
171-
<td>keyboard</td>
172-
<td>Boolean</td>
173-
<td>true</td>
174-
<td>whether support press esc to close</td>
175-
</tr>
176-
<tr>
177-
<td>mousePosition</td>
178-
<td>{x:number,y:number}</td>
179-
<td></td>
180-
<td>set pageX and pageY of current mouse(it will cause transform origin to be set).</td>
181-
</tr>
182-
<tr>
183-
<td>onClose</td>
184-
<td>function()</td>
185-
<td></td>
186-
<td>called when click close button or mask</td>
187-
</tr>
188-
<tr>
189-
<td>afterClose</td>
190-
<td>function()</td>
191-
<td></td>
192-
<td>called when close animation end</td>
193-
</tr>
194-
<tr>
195-
<td>getContainer</td>
196-
<td>function(): HTMLElement</td>
197-
<td></td>
198-
<td>to determine where Dialog will be mounted</td>
199-
</tr>
200-
<tr>
201-
<td>destroyOnClose</td>
202-
<td>Boolean</td>
203-
<td>false</td>
204-
<td>to unmount child compenents on onClose</td>
205-
</tr>
206-
<tr>
207-
<td>closeIcon</td>
208-
<td>ReactNode</td>
209-
<td></td>
210-
<td>specific the close icon.</td>
211-
</tr>
212-
<tr>
213-
<td>forceRender</td>
214-
<td>Boolean</td>
215-
<td>false</td>
216-
<td>Create dialog dom node before dialog first show </td>
217-
</tr>
218-
<tr>
219-
<td>focusTriggerAfterClose</td>
220-
<td>Boolean</td>
221-
<td>true</td>
222-
<td>focus trigger element when dialog closed</td>
223-
</tr>
224-
</tbody>
225-
</table>
57+
| Name | Type | Default | Description | Version |
58+
| ---------------------- | ------------------------------ | --------- | ------------------------------------------------------------------------------- | ------- |
59+
| prefixCls | String | rc-dialog | The dialog dom node's prefixCls | |
60+
| className | String | | additional className for dialog | |
61+
| style | Object | {} | Root style for dialog element.Such as width, height | |
62+
| zIndex | Number | | | |
63+
| bodyStyle | Object | {} | body style for dialog body element.Such as height | |
64+
| maskStyle | Object | {} | style for mask element | |
65+
| visible | Boolean | false | current dialog's visible status | |
66+
| animation | String | | part of dialog animation css class name | |
67+
| maskAnimation | String | | part of dialog's mask animation css class name | |
68+
| transitionName | String | | dialog animation css class name | |
69+
| maskTransitionName | String | | mask animation css class name | |
70+
| title | String\|React.Element | | Title of the dialog | |
71+
| footer | React.Element | | footer of the dialog | |
72+
| closable | Boolean | true | whether show close button | |
73+
| mask | Boolean | true | whether show mask | |
74+
| maskClosable | Boolean | true | whether click mask to close | |
75+
| keyboard | Boolean | true | whether support press esc to close | |
76+
| mousePosition | {x:number,y:number} | | set pageX and pageY of current mouse(it will cause transform origin to be set). | |
77+
| onClose | function() | | called when click close button or mask | |
78+
| afterClose | function() | | called when close animation end | |
79+
| getContainer | function(): HTMLElement | | to determine where Dialog will be mounted | |
80+
| destroyOnClose | Boolean | false | to unmount child compenents on onClose | |
81+
| closeIcon | ReactNode | | specific the close icon. | |
82+
| forceRender | Boolean | false | Create dialog dom node before dialog first show | |
83+
| focusTriggerAfterClose | Boolean | true | focus trigger element when dialog closed | |
84+
| modalRender | (node: ReactNode) => ReactNode | | Custom modal content render | 8.3.0 |
22685

22786
## Development
22887

0 commit comments

Comments
 (0)