Skip to main content

Dialog

A common dialog implemented with Modal

  • props
PropertyDescriptionTypeDefault
visiblevariable to controller whether dialog is visibleboolean-
dismissfunction to set varible of visible, co-work with visiblefunction-
stylestyle of dialog continerany-
titletitlestring-
titleStylestyle of titleany-
contentcontentstring-
contentStylestyle of contentany-
childrencontentReactNode-
okTexttext of positive buttonstring-
okStylestyle of positive buttonany-
cancelTexttext of negative buttonstring-
cancelStylestyle of negative buttonany-
onOktrigger when positive button is clickedfunction-
onCanceltrigger when negative button is clickedfunction-
touchOutsideCancellabledismiss dialog when touch outsid of dialogbooleanfalse
<Dialog
visible={showDialog}
dismiss={() => setShowDialog(false)}
title={'Before We Start'}
content={'If you have more than one code, you can add them together (up to 5) to generate this policy with new max coverage and excess. Each code can only be used for add on within 14 days of purchase.'}
okText={'OK'}
onOk={() => SimpleToast.show('OK')}
cancelText={'Cancel'}
onCancel={() => SimpleToast.show('Cancel')}
/>

dialog