refactor(modaldialog): Use indom element for modal