calintamas / react-native-toast-message

Animated toast message component for React Native
MIT License
1.62k stars 255 forks source link

Export a base toast that can accept any content #471

Closed dominictwlee closed 2 months ago

dominictwlee commented 1 year ago

Is your feature request related to a problem? Please describe. It would be nice to have the base toast functionality (with the touchable dismiss), while being able to fully customize the contents of a toast. Could be some other component with base functionality without any styling opinions.

Describe the solution you'd like

<BaseHeadlessToast> // retains touchable functionality
  <CustomText />
  <CustomContent />
</BaseHeadlessToast>

Describe alternatives you've considered Could implement it from scratch, but I reckon it'd be nice to make the base toast more composable.

Additional context Add any other context or screenshots about the feature request here.

calintamas commented 2 months ago

Already possible, see tomatoToast in the example: https://github.com/calintamas/react-native-toast-message/blob/main/docs/custom-layouts.md#create-custom-layouts