From 69328ade8b939aa0b4d15bf03beee89cd25f4b1d Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 23 Dec 2022 11:31:53 -0600 Subject: [PATCH] Toast: use HStack, RTL support --- app/soapbox/components/ui/toast/toast.tsx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/app/soapbox/components/ui/toast/toast.tsx b/app/soapbox/components/ui/toast/toast.tsx index a7e26c98cd..1e4d1d0866 100644 --- a/app/soapbox/components/ui/toast/toast.tsx +++ b/app/soapbox/components/ui/toast/toast.tsx @@ -6,6 +6,7 @@ import { Link } from 'react-router-dom'; import { ToastText, ToastType } from 'soapbox/toast'; +import HStack from '../hstack/hstack'; import Icon from '../icon/icon'; const renderText = (text: ToastText) => { @@ -63,7 +64,7 @@ const Toast = (props: IToast) => { }; const renderAction = () => { - const classNames = 'ml-3 mt-0.5 flex-shrink-0 rounded-full text-sm font-medium text-primary-600 dark:text-accent-blue hover:underline focus:outline-none'; + const classNames = 'mt-0.5 flex-shrink-0 rounded-full text-sm font-medium text-primary-600 dark:text-accent-blue hover:underline focus:outline-none'; if (action && actionLabel) { return ( @@ -109,24 +110,24 @@ const Toast = (props: IToast) => { } >
-
-
-
+ + +
{renderIcon()}
-

+

{renderText(message)}

-
+ {/* Action */} {renderAction()} -
+ {/* Dismiss Button */} -
+
-
+
);