Skip to main content

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

#NameData typeDefault valueValuesDescription
1classNamestring''
2titlestring''
3messagestring''
4yesActionfunctionfalse
5noActionfunctionfalse
6yesTextstring'Yes'
7noTextstring'No'