Skip to content

Commit

Permalink
fix: Better icon alignment for the Notice component (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfgamaral authored Nov 11, 2024
1 parent 40a73f4 commit 5fee496
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Reactist follows [semantic versioning](https://semver.org/) and doesn't introduce breaking changes (API-wise) in minor or patch releases. However, the appearance of a component might change in a minor or patch release so keep an eye on redesigns and make sure your app still looks and feels like you expect it.

# NEXT

- [Fix] Vertically align the `Notice` component's icon with the first line of text

# 26.2.1

- [Fix] Export `TooltipProvider` as a component
Expand Down
8 changes: 8 additions & 0 deletions src/notice/notice.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
color: var(--reactist-content-primary);
}

.content {
padding-top: calc(var(--reactist-spacing-xsmall) / 2);
}

.icon svg {
display: block;
}

.tone-info svg {
color: var(--reactist-alert-tone-info-icon);
}
Expand Down
6 changes: 4 additions & 2 deletions src/notice/notice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ function Notice({ id, children, tone }: NoticeProps) {
>
<Columns space="small" alignY="top">
<Column width="content">
<AlertIcon tone={tone} />
<Box className={styles.icon}>
<AlertIcon tone={tone} />
</Box>
</Column>
<Column>
<Box paddingY="xsmall">{children}</Box>
<Box className={styles.content}>{children}</Box>
</Column>
</Columns>
</Box>
Expand Down

0 comments on commit 5fee496

Please sign in to comment.