DEV Community

loading...

ReactJS Dialog Box Component

takaneichinose profile image Takane Ichinose ・1 min read

Dialog box component written in ReactJS.

I prepared I18N object, but I only know 3 languages, so I only added those 3 in the constant variable.

This dialog box is inspired by Cupertino design. Textbox is inspired by Twitter Bootstrap. Buttons are inspired by Material design.

These dialog boxes are lightly animated.

Usage: 'btn' attribute is for the text content of the buttons. 'type' is for dialog box type (alert, confirm, prompt). 'title' is for the title of the dialog box. 'msg' is for the message of the dialog box. 'lang' is for the language. 'ok' is the callback function if 'OK' button is pressed. 'cancel' is the callback function if 'Cancel' button is pressed.

Discussion

pic
Editor guide