We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swipeDirection
I want to write a shared component based on Toast, but the direction property has an type error, here is an example code:
Toast
direction
import * as RadixToast from '@radix-ui/react-toast'; export function SharedToast({ description, direction, title, }: { description: string; direction: string; title: string; }) { return ( <RadixToast.Provider swipeDirection={direction as any}> <RadixToast.Root> {title ? <RadixToast.Title>{title}</RadixToast.Title> : null} <RadixToast.Description>{description}</RadixToast.Description> </RadixToast.Root> <RadixToast.Viewport /> </RadixToast.Provider> ); }
and then it will throw an error in my vscode editor, because string is not assignable to SwipeDirection | undefined.
string
SwipeDirection | undefined
No type check error
CodeSandbox Template See above code
Maybe export type SwipeDirection
SwipeDirection
No
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug report
Current Behavior
I want to write a shared component based on
Toast
, but thedirection
property has an type error, here is an example code:and then it will throw an error in my vscode editor, because
string
is not assignable toSwipeDirection | undefined
.Expected behavior
No type check error
Reproducible example
CodeSandbox Template
See above code
Suggested solution
Maybe export type
SwipeDirection
Additional context
No
Your environment
The text was updated successfully, but these errors were encountered: