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
Describe the bug When a custom JSX component is passed to the Toast component, the animations don’t trigger properly. Specifically, the condition
if (jsx) { return jsx; }
short-circuits the rest of the component, preventing any animations from running when a custom component is provided.
To Reproduce Steps to reproduce the behavior:
toast.custom( <View style={{ width: '80%', backgroundColor: '#26252A', paddingLeft: 24, paddingRight: 8, paddingVertical: 8, borderRadius: 999, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', borderCurve: 'continuous', }}> <Text style={{ color: '#fff', fontWeight: '600', }}> Custom JSX </Text> <Touchable style={{ backgroundColor: '#40424B', borderWidth: 1, borderColor: '#55555C', borderRadius: 999, padding: 8, }}> <Text style={{ color: '#fff', fontWeight: '600', }}> Press me </Text> </Touchable> </View>, { duration: 3000, } )
Expected behavior Animations should still run even when a custom JSX component is provided.
Screenshots
Environment info
The text was updated successfully, but these errors were encountered:
Hi, @gunnartorfis, I want to work on this, if that's ok.
Sorry, something went wrong.
@mrpmohiburrahman PRs are always welcome.
I am working on it, full time.
Hi, @gunnartorfis , Please, check this pr: #152
gunnartorfis
Successfully merging a pull request may close this issue.
Describe the bug
When a custom JSX component is passed to the Toast component, the animations don’t trigger properly. Specifically, the condition
short-circuits the rest of the component, preventing any animations from running when a custom component is provided.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Animations should still run even when a custom JSX component is provided.
Screenshots
Screen.Recording.2024-10-24.at.10.43.17.mov
Environment info
The text was updated successfully, but these errors were encountered: