@@ -71,8 +71,9 @@ const CompanyShow = () => (
71
71
72
72
| Prop | Required | Type | Default | Description |
73
73
| ------------------ | -------- | ----------------- | ------- | --------------------------------------------------------------------------------------- |
74
- | ` children ` | Required | ` ReactNode ` | | The content of the dialog |
75
74
| ` ButtonProps ` | Optional | ` object ` | | Object containing props to pass to Material UI's ` <Button> ` |
75
+ | ` children ` | Required | ` ReactNode ` | | The content of the dialog |
76
+ | ` emptyWhileLoading ` | Optional | ` boolean ` | ` false ` | Set to ` true ` to return ` null ` while the list is loading |
76
77
| ` fullWidth ` | Optional | ` boolean ` | ` false ` | If ` true ` , the dialog stretches to the full width of the screen |
77
78
| ` icon ` | Optional | ` ReactElement ` | | Allows to override the default icon |
78
79
| ` id ` | Optional | `string | number` | | The record id. If not provided, it will be deduced from the record context |
@@ -84,7 +85,25 @@ const CompanyShow = () => (
84
85
| ` resource ` | Optional | ` string ` | | The resource name, e.g. ` posts ` |
85
86
| ` sx ` | Optional | ` object ` | | Override the styles applied to the dialog component |
86
87
| ` title ` | Optional | ` ReactNode ` | | The title of the dialog |
87
- | ` emptyWhileLoading ` | Optional | ` boolean ` | ` false ` | Set to ` true ` to return ` null ` while the list is loading |
88
+
89
+
90
+ ## ` ButtonProps `
91
+
92
+ The ` ButtonProps ` prop allows you to pass props to the MUI ` <Button> ` component. For instance, to change the color and size of the button:
93
+
94
+ {% raw %}
95
+
96
+ ``` jsx
97
+ const EditButton = () => (
98
+ < EditInDialogButton ButtonProps= {{ color: ' primary' , fullWidth: true }}>
99
+ < SimpleForm>
100
+ ...
101
+ < / SimpleForm>
102
+ < / EditInDialogButton>
103
+ );
104
+ ```
105
+
106
+ {% endraw %}
88
107
89
108
## ` children `
90
109
@@ -134,24 +153,6 @@ const EditButton = () => (
134
153
);
135
154
```
136
155
137
- ## ` ButtonProps `
138
-
139
- The ` ButtonProps ` prop allows you to pass props to the MUI ` <Button> ` component. For instance, to change the color and size of the button:
140
-
141
- {% raw %}
142
-
143
- ``` jsx
144
- const EditButton = () => (
145
- < EditInDialogButton ButtonProps= {{ color: ' primary' , fullWidth: true }}>
146
- < SimpleForm>
147
- ...
148
- < / SimpleForm>
149
- < / EditInDialogButton>
150
- );
151
- ```
152
-
153
- {% endraw %}
154
-
155
156
## ` fullWidth `
156
157
157
158
By default, ` <EditInDialogButton> ` renders a [ Material UI ` <Dialog> ` ] ( https://mui.com/material-ui/react-dialog/#full-screen-dialogs ) component that takes the width of its content.
0 commit comments