Skip to content

Commit

Permalink
fix: ts issue in toast placement
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Dec 8, 2021
1 parent b9b8ff3 commit b4decca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/slimy-drinks-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chakra-ui/toast": patch
---

Fix TS issue with toast placement utility
2 changes: 1 addition & 1 deletion packages/toast/src/toast.placement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ export function getToastPlacement(
"bottom-end": { ltr: "bottom-right", rtl: "bottom-left" },
}

const logical = logicals[position]
const logical = logicals[position as keyof typeof logicals]
return logical?.[dir] ?? position
}

1 comment on commit b4decca

@vercel
Copy link

@vercel vercel bot commented on b4decca Dec 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.