2020-08-14 06:05:07 +00:00
|
|
|
# SaveCancelButtons
|
|
|
|
|
|
|
|
Save and cancel buttons are located in the settings sections.
|
|
|
|
|
|
|
|
### Usage
|
|
|
|
|
|
|
|
```js
|
2021-02-25 21:19:45 +00:00
|
|
|
import SaveCancelButtons from "@appserver/components/save-cancel-button";
|
2020-08-14 06:05:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
<SaveCancelButtons
|
2020-10-16 13:16:01 +00:00
|
|
|
onSaveClick={() => SomeFunction()}
|
|
|
|
onCancelClick={() => SomeFunction()}
|
|
|
|
showReminder={false}
|
|
|
|
reminderTest="You have unsaved changes"
|
|
|
|
saveButtonLabel="Save"
|
|
|
|
cancelButtonLabel="Cancel"
|
2020-08-14 06:05:07 +00:00
|
|
|
/>
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Properties
|
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
| Props | Type | Required | Values | Default | Description |
|
|
|
|
| ----------------------- | :------: | :------: | :----: | :------: | ------------------------------------------------ |
|
|
|
|
| `onSaveClick` | `func` | - | - | - | What the save button will trigger when clicked |
|
|
|
|
| `onCancelClick` | `func` | - | - | - | What the cancel button will trigger when clicked |
|
|
|
|
| `reminderText` | `string` | - | - | - | Text reminding of unsaved changes |
|
|
|
|
| `showReminder` | `bool` | - | - | - | Show message about unsaved changes. |
|
|
|
|
| Only shown on desktops) |
|
|
|
|
| `saveButtonLabel` | `string` | - | - | `Save` | Save button label |
|
|
|
|
| `cancelButtonLabel` | `string` | - | - | `Cancel` | Cancel button label |
|