Create a Modal popup with buttons
Ok figured it out.

$options = [
    'dialogClass' =&gt; 'my-form',
    'buttons' =&gt; [
        'button1' =&gt; [
            'text' =&gt; 'Proceed',
            'id' =&gt; 'onClickDoSomething',
        ]
    ]
];


And then in the .js file just write a function which fires when clickcing on a selector with the id onClickDoSomething voila, it's working.