Skip to content

Commit

Permalink
fix(Alert): fix close button width (#1542)
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaevAlexandr authored Apr 23, 2024
1 parent 90f24bd commit f916681
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/components/Alert/Alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ $block: '.#{variables.$ns}alert';
&__actions_minContent {
width: min-content;
}

&__close-btn {
flex-shrink: 0;
}
}
1 change: 1 addition & 0 deletions src/components/Alert/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const Alert = (props: AlertProps) => {
{onClose && (
<Button
view="flat"
className={bAlert('close-btn')}
onClick={onClose}
extraProps={{
'aria-label': i18n('label_close'),
Expand Down
2 changes: 1 addition & 1 deletion src/components/Alert/__snapshots__/Alert.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ exports[`Alert has predicted styles if inline layout rendered 1`] = `
</div>
<button
aria-label="Close"
class="g-button g-button_view_flat g-button_size_m g-button_pin_round-round"
class="g-button g-button_view_flat g-button_size_m g-button_pin_round-round g-alert__close-btn"
type="button"
>
<span
Expand Down

0 comments on commit f916681

Please sign in to comment.