Use semantic heading on dialog component (#7383)

* use semantic heading on dialog

Signed-off-by: Kerry Archibald <kerrya@element.io>

* tidy styles

Signed-off-by: Kerry Archibald <kerrya@element.io>

* un-flex text centering

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry 2021-12-15 17:05:58 +01:00 committed by GitHub
parent 43839adec0
commit b174cc8963
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 11 deletions

View file

@ -27,6 +27,7 @@ import { MatrixClientPeg } from '../../../MatrixClientPeg';
import { _t } from "../../../languageHandler";
import MatrixClientContext from "../../../contexts/MatrixClientContext";
import { replaceableComponent } from "../../../utils/replaceableComponent";
import Heading from '../typography/Heading';
import { IDialogProps } from "./IDialogProps";
interface IProps extends IDialogProps {
@ -141,10 +142,10 @@ export default class BaseDialog extends React.Component<IProps> {
'mx_Dialog_headerWithButton': !!this.props.headerButton,
'mx_Dialog_headerWithCancel': !!cancelButton,
})}>
<div className={classNames('mx_Dialog_title', this.props.titleClass)} id='mx_BaseDialog_title'>
<Heading size='h2' className={classNames('mx_Dialog_title', this.props.titleClass)} id='mx_BaseDialog_title'>
{ headerImage }
{ this.props.title }
</div>
</Heading>
{ this.props.headerButton }
{ cancelButton }
</div>