ShowConfirmDialog
In many cases, you will need to implement a confirm dialog to let the user confirm that they are sure they want to perform an action. This helps prevent consequences when a user accidentally clicks the delete button or something similar.
How to use
import React from 'react';
import {ShowConfirmDialog} from '@gyri/native-ui-components';
const MyComponent = () => (
<ShowConfirmDialog
title= {'Are you sure?'}
confirmMessage={'Do you want to logout'}
yesAction={() => console.log('confirm action clicked')}
confirmYesText={'Yes'}
confirmNoText={'No'}>
</ShowConfirmDialog>
);
export default MyComponent;
Props
| # | Name | Data type | Default value | Values | Description |
|---|---|---|---|---|---|
| 1 | title | string | '' | ||
| 2 | confirmMessage | string | '' | ||
| 3 | confirmAction | function | |||
| 4 | confirmYesText | string | 'Yes' | ||
| 5 | confirmNoText | string | 'No' |