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
I have encountered a problem where i want to make some part of text2 prop pressable, like a hyperlink.
I was wondering if there is any way to achieve?
The text was updated successfully, but these errors were encountered:
You can do this by creating your custom toast.
For example,
export const toastConfig = { clickableToast: ({ text1, text2, props }) => ( <View> <Text>{text1}</Text> <Text onPress={props.onPressText2}>{text2}</Text> </View> ) }
Or
export const toastConfig = { clickableToast: ({ text1, text2, props }) => ( <View> <Text>{text1}</Text> <Text>{text2}</Text> {props.buttonText && props.handleClick && ( <TouchableOpacity onPress={props.handleClick}> <Text>{props.buttonText}</Text> </TouchableOpacity> )} </View> ) }
Then, when you want to show it
Toast.show({ type: "clickableToast", text1: "", text2: "", props: { // onPressText2: () => {} buttonText: "", handleClick: () => {}, } })
Sorry, something went wrong.
No branches or pull requests
I have encountered a problem where i want to make some part of text2 prop pressable, like a hyperlink.
I was wondering if there is any way to achieve?
The text was updated successfully, but these errors were encountered: