Skip to content

Commit

Permalink
Bug 46353 alert testo a sx (#349)
Browse files Browse the repository at this point in the history
* fix: fixed classes, margins and paddings of alertBlock to align text to other elements

* added release info

* fixed test for alert block

* fix: added variables
  • Loading branch information
sabrina-bongiovanni authored Sep 21, 2023
1 parent 98ec59c commit b1266b2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
- ...
-->

## Versione X.X.X (dd/mm/yyyy)

### Fix

- Sistemato margine del blocco Alert quando allineato a sinistra

## Versione 8.7.0 (20/09/2023)

### Migliorie
Expand Down
4 changes: 2 additions & 2 deletions src/components/ItaliaTheme/Blocks/Alert/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ 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">
{data.image?.data && (
Expand All @@ -46,7 +46,7 @@ const View = ({ data, pathname }) => {
<Col>{content}</Col>
</Row>
</Container>
</Row>
</div>
</section>
);
};
Expand Down
5 changes: 3 additions & 2 deletions src/components/ItaliaTheme/Blocks/__tests__/Alert.test.jsx

Large diffs are not rendered by default.

14 changes: 14 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,16 @@
}
}

.row {
margin-right: calc(var(--bs-gutter-x) * -0.25);
margin-left: calc(var(--bs-gutter-x) * -0.25);

.col {
padding-right: calc(var(--bs-gutter-x) * 0.25);
padding-left: calc(var(--bs-gutter-x) * 0.25);
}
}

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

0 comments on commit b1266b2

Please sign in to comment.