From b60f873a840d8360191be3d13916a696d54d7e9c Mon Sep 17 00:00:00 2001 From: Alexandr Isaev Date: Tue, 23 Apr 2024 14:44:16 +0300 Subject: [PATCH 1/2] fix(Alert): fix close button width --- src/components/Alert/Alert.scss | 4 ++++ src/components/Alert/Alert.tsx | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/Alert/Alert.scss b/src/components/Alert/Alert.scss index de329d75f3..34b4ede0ca 100644 --- a/src/components/Alert/Alert.scss +++ b/src/components/Alert/Alert.scss @@ -14,4 +14,8 @@ $block: '.#{variables.$ns}alert'; &__actions_minContent { width: min-content; } + + &__close-btn { + flex-shrink: 0; + } } diff --git a/src/components/Alert/Alert.tsx b/src/components/Alert/Alert.tsx index 902340d6ef..c79ef2f5e9 100644 --- a/src/components/Alert/Alert.tsx +++ b/src/components/Alert/Alert.tsx @@ -17,6 +17,10 @@ import {DEFAULT_ICON_SIZE, bAlert} from './constants'; import i18n from './i18n'; import type {AlertProps} from './types'; +const closeBtnExtraProps = { + 'aria-label': i18n('label_close'), +}; + export const Alert = (props: AlertProps) => { const { theme = 'normal', @@ -66,10 +70,9 @@ export const Alert = (props: AlertProps) => { {onClose && (