Skip to content

Commit

Permalink
fix: fixed classes, margins and paddings of alertBlock to align text …
Browse files Browse the repository at this point in the history
…to other elements
  • Loading branch information
sabrina-bongiovanni committed Sep 20, 2023
1 parent c2e9aaa commit fded095
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/ItaliaTheme/Blocks/Alert/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const View = ({ data, pathname }) => {

return (
<section role="alert" className="block alertblock">
<Row className={cx('row-full-width', 'bg-alert-' + data.color)}>
<div className={cx('full-width', 'bg-alert-' + data.color)}>
<Container className="p-4 pt-5 pb-5">
<Row className="align-items-start">
<Row className="align-items-start negative-margin">
{data.image?.data && (
<Col sm={2} className="pb-3 image-col">
<img
Expand All @@ -46,7 +46,7 @@ const View = ({ data, pathname }) => {
<Col>{content}</Col>
</Row>
</Container>
</Row>
</div>
</section>
);
};
Expand Down
13 changes: 13 additions & 0 deletions src/theme/ItaliaTheme/Blocks/_alert.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.public-ui {
.block.alertblock,
.alertblock {
.full-width {
height: auto;
}

.bg-alert-danger {
background-color: #a32219;
color: $white;
Expand Down Expand Up @@ -67,6 +71,15 @@
}
}

.negative-margin {
margin-left: -6px;
margin-right: -6px;

.col {
padding: 0px 6px;
}
}

.DraftEditor-root {
background: none;
}
Expand Down

0 comments on commit fded095

Please sign in to comment.