DEV Community

Discussion on: Building a modal in React.

Collapse
kazimagha profile image
KazimAgha

Hi, if i want to add Function on Continue button how can i do that?
basically i want to display a dropdown menu as i click continue button

Collapse
achowba profile image
Atauba Prince Author

Hello
Add this below the closeModalHandler

continueFunction = () => {
    // your function body goes here
}
Enter fullscreen mode Exit fullscreen mode

and then change the continue button to this

<button className="btn-continue" onClick={props.close}>CONTINUE</button>
Enter fullscreen mode Exit fullscreen mode