Skip to content

Commit

Permalink
fix: remove last margin of elements in Alert (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Butterworth committed Jul 8, 2021
1 parent 203cbfd commit db0f440
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Alert/Alert.scss
Expand Up @@ -18,7 +18,7 @@
@include border-radius($alert-border-radius);
box-shadow: $alert-box-shadow;

& > :last-child {
.alert-message-content > :last-child {
margin-bottom: 0;
}

Expand Down
8 changes: 6 additions & 2 deletions src/Alert/__snapshots__/Alert.test.jsx.snap
Expand Up @@ -25,7 +25,9 @@ exports[`<Alert /> correct rendering renders with correct with icon 1`] = `
/>
</svg>
</span>
<div>
<div
className="alert-message-content"
>
Alert
</div>
</div>
Expand All @@ -36,7 +38,9 @@ exports[`<Alert /> correct rendering renders without icon prop 1`] = `
className="fade alert-content undefined alert show"
role="alert"
>
<div>
<div
className="alert-message-content"
>
Alert
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Alert/index.jsx
Expand Up @@ -14,7 +14,7 @@ const WrappedAlert = React.forwardRef(({
ref={ref}
>
{icon && <Icon src={icon} className="alert-icon" />}
<div>
<div className="alert-message-content">
{children}
</div>
</Alert>
Expand Down

0 comments on commit db0f440

Please sign in to comment.