So I am trying to create a component that I can use anywhere in my app. I am not entirely sure how to explain it accurately but I'll use the sweet alert library as an example.
So in swal, you can simply call something like this and the component would render itself.
import swal from 'sweetalert';
swal("Hello world!");
How can I replicate that into my own component so I could call it like
ConfirmationDialog({
message: 'test',
visibility: true,
onConfirm: handleOnConfirm,
onCancel: handleOnCancel
})