Skip to content

Commit

Permalink
fix: fix Contact Block items align (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini authored Sep 19, 2023
1 parent 9e8579b commit c2e9aaa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@
### Fix
- ...
-->

## Versione X.X.X

### Fix

- Sistemato l'allineamento degli elementi nel blocco Contatti: se ci sono meno di tre elementi l'allineamento è centrato, se ce ne sono più di 3 l'allineamento è a sinistra.
10 changes: 8 additions & 2 deletions src/components/ItaliaTheme/Blocks/ContactsBlock/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,15 @@ class Edit extends SubblocksEdit {
</div>

<SubblocksWrapper node={this.node}>
<Row className="justify-content-center">
<Row
className={
this.state.subblocks.length > 3
? 'justify-content-start'
: 'justify-content-center'
}
>
{this.state.subblocks.map((subblock, subindex) => (
<Col lg="4" key={subblock.id}>
<Col lg="4" key={subblock.id} className="pb-3">
<EditBlock
data={subblock}
index={subindex}
Expand Down
8 changes: 7 additions & 1 deletion src/components/ItaliaTheme/Blocks/ContactsBlock/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ const AccordionView = ({ data, block }) => {
)}
</div>
</div>
<Row className="justify-content-center">
<Row
className={
data.subblocks.length > 3
? 'justify-content-start'
: 'justify-content-center'
}
>
{data.subblocks.map((subblock, index) => (
<Col lg="4" key={subblock.id} className="pb-3">
<ViewBlock
Expand Down

0 comments on commit c2e9aaa

Please sign in to comment.