Skip to content

Commit 0401d74

Browse files
committed
fix(toaster): adjust toast position based on text direction for better accessibility
1 parent a04b7aa commit 0401d74

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dashboard/src/components/ui/sonner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const Toaster = ({ ...props }: ToasterProps) => {
1313
theme={resolvedTheme as ToasterProps['theme']}
1414
className="toaster group font-body"
1515
dir={dir}
16-
position='top-right'
16+
position={dir === 'rtl' ? 'top-left' : 'top-right'}
1717
toastOptions={{
1818
classNames: {
1919
toast: 'group font-body toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',

dashboard/src/components/users/action-buttons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ const ActionButtons: FC<ActionButtonsProps> = ({ user }) => {
389389
</DropdownMenuTrigger>
390390
<DropdownMenuContent>
391391
{subscribeLinks.map(subLink => (
392-
<DropdownMenuItem className="justify-start p-0" key={subLink.link} onClick={() => handleCopyOrDownload(subLink)}>
392+
<DropdownMenuItem dir='ltr' className="justify-start p-0" key={subLink.link} onClick={() => handleCopyOrDownload(subLink)}>
393393
<span className="flex w-full items-center gap-2 px-2 py-1.5">
394394
<span className="text-sm">{subLink.icon}</span>
395395
<span>{subLink.protocol}</span>

0 commit comments

Comments
 (0)