Skip to content

Commit

Permalink
create showDialog doc + fix some typo
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanMarmelab committed Feb 25, 2025
1 parent 28ab7a8 commit ce44625
Show file tree
Hide file tree
Showing 4 changed files with 463 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/CreateDialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ In the related `<Resource>`, you don't need to declare a `create` component as t
| `children` | Required | `ReactNode` | | The content of the dialog |
| `fullWidth` | Optional | `boolean` | `false` | If `true`, the dialog stretches to the full width of the screen |
| `maxWidth` | Optional | `string` | `sm` | The max width of the dialog |
| `mutation Options` | Optional | `object` | | The options to pass to the `useMutation` hook |
| `mutationOptions` | Optional | `object` | | The options to pass to the `useMutation` hook |
| `resource` | Optional | `string` | | The resource name, e.g. `posts` |
| `sx` | Optional | `object` | | Override the styles applied to the dialog component |
| `title` | Optional | `ReactNode` | | The title of the dialog |
Expand Down
4 changes: 2 additions & 2 deletions docs/EditDialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ In the related `<Resource>`, you don't need to declare an `edit` component as th
| `fullWidth` | Optional | `boolean` | `false` | If `true`, the dialog stretches to the full width of the screen |
| `id` | Optional | `string | number` | | The record id. If not provided, it will be deduced from the record context |
| `maxWidth` | Optional | `string` | `sm` | The max width of the dialog |
| `mutation Options` | Optional | `object` | | The options to pass to the `useMutation` hook |
| `mutationOptions` | Optional | `object` | | The options to pass to the `useMutation` hook |
| `queryOptions` | Optional | `object` | | The options to pass to the `useQuery` hook |
| `resource` | Optional | `string` | | The resource name, e.g. `posts` |
| `sx` | Optional | `object` | | Override the styles applied to the dialog component |
Expand Down Expand Up @@ -236,7 +236,7 @@ const MyEditDialog = () => (

## `title`

Unlike the `<Create>` components, with Dialog components the title will be displayed in the `<Dialog>`, not in the `<AppBar>`.
Unlike the `<Edit>` components, with Dialog components the title will be displayed in the `<Dialog>`, not in the `<AppBar>`.
If you pass a custom title component, it will render in the same `RecordContext` as the dialog's child component. That means you can display non-editable details of the current `record` in the title component.
Here is an example:

Expand Down
2 changes: 1 addition & 1 deletion docs/EditInDialogButton.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const CompanyShow = () => (
| `inline` | Optional | `boolean` | | Set to true to display only a Material UI `<IconButton>` instead of the full `<Button>` |
| `label` | Optional | `string` | | Allows to override the default button label. I18N is supported |
| `maxWidth` | Optional | `string` | `sm` | The max width of the dialog |
| `mutation Options` | Optional | `object` | | The options to pass to the `useMutation` hook |
| `mutationOptions` | Optional | `object` | | The options to pass to the `useMutation` hook |
| `queryOptions` | Optional | `object` | | The options to pass to the `useQuery` hook   |
| `resource` | Optional | `string` | | The resource name, e.g. `posts` |
| `sx` | Optional | `object` | | Override the styles applied to the dialog component |
Expand Down
Loading

0 comments on commit ce44625

Please sign in to comment.