refactor(modal): add class to element instead of template expression
feat(modal): support custom template for modal window

Closes #2057