Skip to content

Commit 97c03c4

Browse files
committed
Update documentation
1 parent 4d31c1d commit 97c03c4

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

docs/Buttons.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -898,18 +898,19 @@ If your `authProvider` implements [Access Control](./Permissions.md#access-contr
898898

899899
Delete the current record after a confirm dialog has been accepted. To be used inside a `<Toolbar/>` component.
900900

901-
| Prop | Required | Type | Default | Description |
902-
|------------------- |----------|--------------------------------------------------|-----------------------------|-------------------------------------------------------------------------|
903-
| `className` | Optional | `string` | - | Class name to customize the look and feel of the button element itself |
904-
| `label` | Optional | `string` | 'ra.action.delete' | label or translation message to use |
905-
| `icon` | Optional | `ReactElement` | `<DeleteIcon>` | iconElement, e.g. `<CommentIcon />` |
906-
| `confirmTitle` | Optional | `ReactNode` | 'ra.message.delete_title' | Title of the confirm dialog |
907-
| `confirmContent` | Optional | `ReactNode` | 'ra.message.delete_content' | Message or React component to be used as the body of the confirm dialog |
908-
| `confirmColor` | Optional | <code>'primary' &#124; 'warning'</code> | 'primary' | The color of the confirm dialog's "Confirm" button |
909-
| `redirect` | Optional | <code>string &#124; false &#124; Function</code> | 'list' | Custom redirection after success side effect |
910-
| `translateOptions` | Optional | `{ id?: string, name?: string }` | {} | Custom id and name to be used in the confirm dialog's title |
911-
| `mutationOptions` | Optional | | null | options for react-query `useMutation` hook |
912-
| `successMessage` | Optional | `string` | 'ra.notification.deleted' | Lets you customize the success notification message. |
901+
| Prop | Required | Type | Default | Description |
902+
|-------------------------- |----------|--------------------------------------------------|-----------------------------|-------------------------------------------------------------------------|
903+
| `className` | Optional | `string` | - | Class name to customize the look and feel of the button element itself |
904+
| `confirmTitle` | Optional | `ReactNode` | 'ra.message.delete_title' | Title of the confirm dialog |
905+
| `confirmContent` | Optional | `ReactNode` | 'ra.message.delete_content' | Message or React component to be used as the body of the confirm dialog |
906+
| `confirmColor` | Optional | <code>'primary' &#124; 'warning'</code> | 'primary' | The color of the confirm dialog's "Confirm" button |
907+
| `contentTranslateOptions` | Optional | `Object` | {} | Custom id, name and record representation to be used in the confirm dialog's title |
908+
| `icon` | Optional | `ReactElement` | `<DeleteIcon>` | iconElement, e.g. `<CommentIcon />` |
909+
| `label` | Optional | `string` | 'ra.action.delete' | label or translation message to use |
910+
| `mutationOptions` | Optional | | null | options for react-query `useMutation` hook |
911+
| `redirect` | Optional | <code>string &#124; false &#124; Function</code> | 'list' | Custom redirection after success side effect |
912+
| `titleTranslateOptions` | Optional | `Object` | {} | Custom id, name and record representation to be used in the confirm dialog's content |
913+
| `successMessage` | Optional | `string` | 'ra.notification.deleted' | Lets you customize the success notification message. |
913914

914915
{% raw %}
915916
```jsx
@@ -1361,13 +1362,15 @@ export const PostEdit = () => (
13611362

13621363
`<UpdateButton>` accepts the following props:
13631364

1364-
| Prop | Required | Type | Default | Description |
1365-
| ---------------- | -------- | ----------- | ---------- | -------------------------------------------------------- |
1366-
| `data` | Required | `object` | | The data used to update the record |
1367-
| `mutationMode` | Optional | `string` | `undoable` | Mutation mode (`'undoable'`, `'pessimistic'` or `'optimistic'`) |
1368-
| `confirmTitle` | Optional | `ReactNode` | `ra.message.bulk_update_title` | The title of the confirmation dialog when `mutationMode` is not `undoable` |
1369-
| `confirmContent` | Optional | `ReactNode` | `ra.message.bulk_update_content` | The content of the confirmation dialog when `mutationMode` is not `undoable` |
1370-
| `mutationOptions` | Optional | `Object` | | The react-query mutation options |
1365+
| Prop | Required | Type | Default | Description |
1366+
| ------------------------- | -------- | ----------- | -------------------------------- | -------------------------------------------------------- |
1367+
| `data` | Required | `Object` | | The data used to update the record |
1368+
| `confirmTitle` | Optional | `ReactNode` | `ra.message.bulk_update_title` | The title of the confirmation dialog when `mutationMode` is not `undoable` |
1369+
| `confirmContent` | Optional | `ReactNode` | `ra.message.bulk_update_content` | The content of the confirmation dialog when `mutationMode` is not `undoable` |
1370+
| `contentTranslateOptions` | Optional | `Object` | {} | Custom id, name and record representation to be used in the confirm dialog's title |
1371+
| `mutationMode` | Optional | `string` | `undoable` | Mutation mode (`'undoable'`, `'pessimistic'` or `'optimistic'`) |
1372+
| `mutationOptions` | Optional | `Object` | | The react-query mutation options |
1373+
| `titleTranslateOptions` | Optional | `Object` | {} | Custom id, name and record representation to be used in the confirm dialog's content |
13711374

13721375
`<UpdateButton>` also accepts the [Button props](./Buttons.md#button).
13731376

0 commit comments

Comments
 (0)