Use a custom header component, and specify it in the templates property in the dialog configuration. Then you can style the header in the header component itself!
Example dialog config templates usage
{
templates: {
header: Header,
footer: Footer,
},
}
Working Example