From c0b511f96f9c4d489d21e911e32c0c1904df0d71 Mon Sep 17 00:00:00 2001 From: Ilya Date: Fri, 20 Dec 2024 13:18:14 +0300 Subject: [PATCH] feat(new-hope): dynemic width close button in toast --- packages/plasma-new-hope/src/components/Toast/Toast.styles.ts | 2 +- packages/sdds-cs/src/components/Toast/Toast.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plasma-new-hope/src/components/Toast/Toast.styles.ts b/packages/plasma-new-hope/src/components/Toast/Toast.styles.ts index 75679db898..fd643ec32d 100644 --- a/packages/plasma-new-hope/src/components/Toast/Toast.styles.ts +++ b/packages/plasma-new-hope/src/components/Toast/Toast.styles.ts @@ -16,7 +16,7 @@ export const base = css` user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - ${buttonTokens.buttonWidth}: 1rem; + ${buttonTokens.buttonWidth}: var(${tokens.closeIconButtonSize}); `; export const StyledRoot = styled.div<{ position: string; isVisible: boolean; offset?: number }>` diff --git a/packages/sdds-cs/src/components/Toast/Toast.config.ts b/packages/sdds-cs/src/components/Toast/Toast.config.ts index 5c2d6ecbba..3ff9a5ba98 100644 --- a/packages/sdds-cs/src/components/Toast/Toast.config.ts +++ b/packages/sdds-cs/src/components/Toast/Toast.config.ts @@ -44,7 +44,7 @@ export const config = { ${toastTokens.lineHeight}: var(--plasma-typo-body-m-line-height); ${toastTokens.leftContentMargin}: -0.0625rem 0.5rem -0.0625rem 0rem; - ${toastTokens.closeIconMargin}: -0.0625rem 0.125rem -0.0625rem 0.75rem; + ${toastTokens.closeIconMargin}: -0.0625rem 0rem -0.0625rem 0.5rem; `, }, closeIconType: {