Skip to main content

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

#NameData typeDefault valueValuesDescription
1titlestring''
2confirmMessagestring''
3confirmActionfunction
4confirmYesTextstring'Yes'
5confirmNoTextstring'No'