YesNoDialog
Yes/no dialog boxes are often used to confirm an action, such as deleting a file or exiting a program. They can also be used to ask the user for permission to perform an action.
How to use
import React from 'react';
import {YesNoDialog} from '@gyri/native-ui-components';
const MyComponent = () => (
<YesNoDialog
title={'Are you sure?'}
yesAction={() => console.log('confirm action clicked')}
message={'Do you want to logout'}>
<Button mode={'outlined'} className={'w-1/2'}>
Show Dialog
</Button>
</YesNoDialog>
);
export default MyComponent;
props
| # | Name | Data type | Default value | Values | Description |
|---|---|---|---|---|---|
| 1 | className | string | '' | ||
| 2 | title | string | '' | ||
| 3 | message | string | '' | ||
| 4 | yesAction | function | false | ||
| 5 | noAction | function | false | ||
| 6 | yesText | string | 'Yes' | ||
| 7 | noText | string | 'No' |