From 98b2e35c39312fa5a756d1d3b021c301ec9fdbd6 Mon Sep 17 00:00:00 2001 From: Vineeth Asok Kumar Date: Fri, 15 Sep 2023 14:20:54 +0200 Subject: [PATCH] Fix token in toast (#140) --- src/components/Toast/Toast.tsx | 2 +- src/styles/types.ts | 3 +++ src/styles/variables.json | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/Toast/Toast.tsx b/src/components/Toast/Toast.tsx index c81683ed..1f0123ac 100644 --- a/src/components/Toast/Toast.tsx +++ b/src/components/Toast/Toast.tsx @@ -181,7 +181,7 @@ const Viewport = styled(RadixUIToast.Viewport)` flex-direction: column; padding: var(--viewport-padding); gap: ${({ theme }) => theme.click.toast.space.gap}; - width: 390px; + width: ${({ theme }) => theme.click.toast.size.width}; max-width: 100vw; margin: 0; list-style: none; diff --git a/src/styles/types.ts b/src/styles/types.ts index ef5f22ec..c191bad3 100644 --- a/src/styles/types.ts +++ b/src/styles/types.ts @@ -1897,6 +1897,9 @@ "default": string } }, + "size": { + "width": string + }, "color": { "title": { "default": string diff --git a/src/styles/variables.json b/src/styles/variables.json index 496c8f40..7af73965 100644 --- a/src/styles/variables.json +++ b/src/styles/variables.json @@ -1896,6 +1896,9 @@ "default": "400 0.75rem/1.5 \"Inter\", '\"SF Pro Display\"', -apple-system, BlinkMacSystemFont, '\"Segoe UI\"', Roboto, Oxygen, Ubuntu, Cantarell, '\"Open Sans\"', '\"Helvetica Neue\"', sans-serif;" } }, + "size": { + "width": "20.75rem" + }, "color": { "title": { "default": "#161517"