Site icon Hip-Hop Website Design and Development

Show popover with url and option to open in new window

I am creating a custom block and I want to show a button which the user can edit the text of and I want them to be able to select a page/enter a link. I have this working but using URLInputButton does not give the option to open in a new tab like the default wordpress popover when you highlight some text and then choose to add a hyperlink.

This is what I currently have:

<URLInputButton url={url} onChange={onURLChange} />

I have also played around with a popover but not sure how to put what I want in there. This just does what it says and shows text that says ‘Popover is toggled!"

<Button variant="secondary" onClick={toggleVisible}>
     Toggle Popover!
     {isVisible && <Popover>Popover is toggled!</Popover>}
</Button>