Merge pull request #13739 from ramonlsouza/modal-title-margin

style: Center modal title
This commit is contained in:
Anton Georgiev 2021-11-22 15:10:37 -05:00 committed by GitHub
commit 2d5742c581
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -81,7 +81,7 @@ class ModalSimple extends Component {
{...otherProps}
>
<Styled.Header hideBorder={hideBorder}>
<Styled.Title>{title}</Styled.Title>
<Styled.Title hasLeftMargin={shouldShowCloseButton}>{title}</Styled.Title>
{shouldShowCloseButton ? (
<Styled.DismissButton
label={intl.formatMessage(intlMessages.modalClose)}

View File

@ -45,6 +45,10 @@ const Title = styled.h1`
font-size: ${fontSizeLarge};
text-align: center;
align-self: flex-end;
${({ hasLeftMargin }) => hasLeftMargin && `
margin-left: 35px;
`}
`;
const DismissButton = styled(Button)`