From a00d76a73f2ae6cfb62be3c5bfce6a1b715af334 Mon Sep 17 00:00:00 2001 From: Frankie Yan Date: Tue, 31 Oct 2023 13:38:06 -0700 Subject: [PATCH 1/4] fix: Better alignment for Alert icons --- src/alert/alert.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/alert/alert.tsx b/src/alert/alert.tsx index ccd00f5ef..9bf372ba7 100644 --- a/src/alert/alert.tsx +++ b/src/alert/alert.tsx @@ -35,7 +35,9 @@ function Alert({ id, children, tone, closeLabel, onClose }: AlertProps) { > - + + + Date: Tue, 31 Oct 2023 13:47:04 -0700 Subject: [PATCH 2/4] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f000c081..8138cfda0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Reactist follows [semantic versioning](https://semver.org/) and doesn't introduc # Next - [Feat] Expose `showTimeout` and `hideTimeout` props for `Tooltip` +- [Fix] The center alignment between the `Alert` component's icon and message is now more accurate when the message is only one-line long. # v26.0.0 From ba2490961b90c454ef2db74c26fc202433cc7a1d Mon Sep 17 00:00:00 2001 From: Frankie Yan Date: Wed, 23 Oct 2024 16:29:44 -0700 Subject: [PATCH 3/4] Use IconButton in Alert --- src/alert/alert.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/alert/alert.tsx b/src/alert/alert.tsx index 9bf372ba7..cbb1eff18 100644 --- a/src/alert/alert.tsx +++ b/src/alert/alert.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { getClassNames } from '../utils/responsive-props' import { Box } from '../box' -import { Button } from '../button' +import { IconButton } from '../button' import { Columns, Column } from '../columns' import { AlertIcon } from '../icons/alert-icon' @@ -49,7 +49,7 @@ function Alert({ id, children, tone, closeLabel, onClose }: AlertProps) { {onClose != null && closeLabel != null ? ( -