Skip to content

Commit

Permalink
fix(IllustrationDialog): The title was not centered properly
Browse files Browse the repository at this point in the history
it is now, no matter if there is a back or close button
  • Loading branch information
JF-Cozy committed Jan 19, 2023
1 parent 3897304 commit 584a58c
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions react/CozyDialogs/IllustrationDialog.jsx
Expand Up @@ -17,7 +17,11 @@ const IllustrationDialog = props => {
fullScreen,
dialogActionsProps,
dialogContentProps
} = useCozyDialog({ ...props, isFluidTitle: true })
} = useCozyDialog({
...props,
isFluidTitle: true,
disableTitleAutoPadding: true
})

const onBackOrClose = onBack || onClose

Expand All @@ -44,9 +48,17 @@ const IllustrationDialog = props => {
<DialogContent {...dialogContentProps}>
<div className="dialogContentInner withFluidActions">
{title && (
<DialogTitle {...dialogTitleProps}>
<div className="u-flex u-flex-justify-center">{title}</div>
</DialogTitle>
<div className="dialogTitleFluidContainer">
<DialogTitle
{...dialogTitleProps}
className={cx(
`u-flex u-flex-justify-center`,
dialogTitleProps.className
)}
>
{title}
</DialogTitle>
</div>
)}
<div
className={cx('dialogContentWrapper', {
Expand Down

0 comments on commit 584a58c

Please sign in to comment.