react-native-toast-popup-message
v1.0.0
Published
A customizable toast message component for React Native applications. Supports multiple themes, configurable duration, and flexible positioning.
Downloads
4
Maintainers
Readme
��#� �r�e�a�c�t�-�n�a�t�i�v�e�-�t�o�a�s�t�-�m�e�s�s�a�g�e�
�
�r�e�a�c�t�-�n�a�t�i�v�e�-�t�o�a�s�t�-�m�e�s�s�a�g�e�
�
�
�
�A� �c�u�s�t�o�m�i�z�a�b�l�e�,� �e�a�s�y�-�t�o�-�u�s�e� �t�o�a�s�t� �m�e�s�s�a�g�e� �c�o�m�p�o�n�e�n�t� �f�o�r� �R�e�a�c�t� �N�a�t�i�v�e� �a�p�p�l�i�c�a�t�i�o�n�s�.� �D�i�s�p�l�a�y� �t�o�a�s�t� �n�o�t�i�f�i�c�a�t�i�o�n�s� �w�i�t�h� �v�a�r�i�o�u�s� �t�h�e�m�e�s� �a�n�d� �c�o�n�f�i�g�u�r�a�t�i�o�n�s� �t�o� �e�n�h�a�n�c�e� �u�s�e�r� �e�x�p�e�r�i�e�n�c�e�.�
�
�
�
�#� �F�e�a�t�u�r�e�s�
�
�C�u�s�t�o�m�i�z�a�b�l�e� �T�h�e�m�e�s�:� �P�r�e�d�e�f�i�n�e�d� �t�h�e�m�e�s� �i�n�c�l�u�d�e� �d�e�f�a�u�l�t�,� �p�r�i�m�a�r�y�,� �e�r�r�o�r�,� �w�a�r�n�i�n�g�,� �a�n�d� �s�u�c�c�e�s�s�,� �a�l�l� �w�i�t�h� �s�e�m�i�-�t�r�a�n�s�p�a�r�e�n�t� �b�a�c�k�g�r�o�u�n�d�s� �a�n�d� �w�h�i�t�e� �t�e�x�t�.�
�
�C�o�n�f�i�g�u�r�a�b�l�e� �D�u�r�a�t�i�o�n�:� �S�e�t� �t�h�e� �d�u�r�a�t�i�o�n� �f�o�r� �w�h�i�c�h� �t�h�e� �t�o�a�s�t� �m�e�s�s�a�g�e� �i�s� �d�i�s�p�l�a�y�e�d� �(�d�e�f�a�u�l�t� �i�s� �2� �s�e�c�o�n�d�s�)�.�
�
�F�l�e�x�i�b�l�e� �P�o�s�i�t�i�o�n�i�n�g�:� �D�i�s�p�l�a�y� �t�o�a�s�t� �m�e�s�s�a�g�e�s� �a�t� �t�h�e� �t�o�p�,� �m�i�d�d�l�e�,� �o�r� �b�o�t�t�o�m� �o�f� �t�h�e� �s�c�r�e�e�n�.�
�
�E�a�s�y� �I�n�t�e�g�r�a�t�i�o�n�:� �S�i�m�p�l�e� �A�P�I� �t�o� �s�h�o�w� �t�o�a�s�t� �m�e�s�s�a�g�e�s� �f�r�o�m� �a�n�y�w�h�e�r�e� �i�n� �y�o�u�r� �a�p�p� �u�s�i�n�g� �T�o�a�s�t�.�s�h�o�w�(�)�.�
�
�
�
�#� �I�n�s�t�a�l�l�a�t�i�o�n�
�
��
��s�h�
�
�n�p�m� �i�n�s�t�a�l�l� �r�e�a�c�t�-�n�a�t�i�v�e�-�t�o�a�s�t�-�m�e�s�s�a�g�e�
�
�
��
�
�
�#� �U�s�a�g�e�
�
��
��j�s�x�
�
�I�m�p�o�r�t� �a�n�d� �i�n�c�l�u�d�e� �t�h�e� �T�o�a�s�t�C�o�n�t�a�i�n�e�r� �i�n� �y�o�u�r� �m�a�i�n� �c�o�m�p�o�n�e�n�t�:�
�
�
�
�/�/� �A�p�p�.�j�s�
�
�i�m�p�o�r�t� �R�e�a�c�t� �f�r�o�m� �'�r�e�a�c�t�'�;�
�
�i�m�p�o�r�t� �{� �V�i�e�w�,� �B�u�t�t�o�n�,� �S�t�y�l�e�S�h�e�e�t� �}� �f�r�o�m� �'�r�e�a�c�t�-�n�a�t�i�v�e�'�;�
�
�i�m�p�o�r�t� �{� �T�o�a�s�t�,� �T�o�a�s�t�C�o�n�t�a�i�n�e�r� �}� �f�r�o�m� �'�r�e�a�c�t�-�n�a�t�i�v�e�-�t�o�a�s�t�-�m�e�s�s�a�g�e�'�;�
�
�
�
�c�o�n�s�t� �A�p�p� �=� �(�)� �=�>� �{�
�
� � �c�o�n�s�t� �h�a�n�d�l�e�B�u�t�t�o�n�P�r�e�s�s� �=� �(�)� �=�>� �{�
�
� � � � �T�o�a�s�t�.�s�h�o�w�(�{�
�
� � � � � � �t�y�p�e�:� �'�e�r�r�o�r�'�,�
�
� � � � � � �t�e�x�t�:� �'�T�h�i�s� �i�s� �a�n� �e�r�r�o�r� �m�e�s�s�a�g�e�'�,�
�
� � � � � � �p�o�s�i�t�i�o�n�:� �'�t�o�p�'�,�
�
� � � � � � �d�u�r�a�t�i�o�n�:� �3�0�0�0�,�
�
� � � � �}�)�;�
�
� � �}�;�
�
�
�
� � �r�e�t�u�r�n� �(�
�
� � � � �<�V�i�e�w� �s�t�y�l�e�=�{�s�t�y�l�e�s�.�c�o�n�t�a�i�n�e�r�}�>�
�
� � � � � � �<�B�u�t�t�o�n� �t�i�t�l�e�=�"�S�h�o�w� �T�o�a�s�t�"� �o�n�P�r�e�s�s�=�{�h�a�n�d�l�e�B�u�t�t�o�n�P�r�e�s�s�}� �/�>�
�
� � � � � � �<�T�o�a�s�t�C�o�n�t�a�i�n�e�r� �/�>�
�
� � � � �<�/�V�i�e�w�>�
�
� � �)�;�
�
�}�;�
�
�
�
�c�o�n�s�t� �s�t�y�l�e�s� �=� �S�t�y�l�e�S�h�e�e�t�.�c�r�e�a�t�e�(�{�
�
� � �c�o�n�t�a�i�n�e�r�:� �{�
�
� � � � �f�l�e�x�:� �1�,�
�
� � � � �j�u�s�t�i�f�y�C�o�n�t�e�n�t�:� �'�c�e�n�t�e�r�'�,�
�
� � � � �a�l�i�g�n�I�t�e�m�s�:� �'�c�e�n�t�e�r�'�,�
�
� � �}�,�
�
�}�)�;�
�
�
�
�e�x�p�o�r�t� �d�e�f�a�u�l�t� �A�p�p�;�
�
�
��
�
�
�S�h�o�w� �t�o�a�s�t� �m�e�s�s�a�g�e�s� �f�r�o�m� �a�n�y�w�h�e�r�e� �i�n� �y�o�u�r� �a�p�p�:�
�
�
�
��
��j�s�x�
�
�T�o�a�s�t�.�s�h�o�w�(�{�
�
� � �t�y�p�e�:� �'�s�u�c�c�e�s�s�'�,�
�
� � �t�e�x�t�:� �'�O�p�e�r�a�t�i�o�n� �s�u�c�c�e�s�s�f�u�l�!�'�,�
�
� � �p�o�s�i�t�i�o�n�:� �'�b�o�t�t�o�m�'�,�
�
� � �d�u�r�a�t�i�o�n�:� �2�0�0�0�,�
�
�}�)�;�
�
�
��
�
�
�#� �C�u�s�t�o�m�i�z�a�t�i�o�n�
�
�
�
�#�#� �T�y�p�e�
�
�S�e�t� �t�h�e� �t�y�p�e� �o�f� �t�o�a�s�t� �m�e�s�s�a�g�e� �(�d�e�f�a�u�l�t�,� �p�r�i�m�a�r�y�,� �e�r�r�o�r�,� �w�a�r�n�i�n�g�,� �s�u�c�c�e�s�s�)�.�
�
�#�#� �T�e�x�t�
�
�C�u�s�t�o�m�i�z�e� �t�h�e� �m�e�s�s�a�g�e� �t�e�x�t� �w�i�t�h� �t�h�e� �t�e�x�t� �p�r�o�p�e�r�t�y�.�
�
�#�#� �P�o�s�i�t�i�o�n�
�
�C�o�n�t�r�o�l� �t�h�e� �v�e�r�t�i�c�a�l� �p�o�s�i�t�i�o�n� �o�f� �t�h�e� �t�o�a�s�t� �m�e�s�s�a�g�e� �(�t�o�p�,� �m�i�d�d�l�e�,� �b�o�t�t�o�m�)�.�
�
�#�#� �D�u�r�a�t�i�o�n�
�
�S�p�e�c�i�f�y� �h�o�w� �l�o�n�g� �t�h�e� �t�o�a�s�t� �m�e�s�s�a�g�e� �s�h�o�u�l�d� �b�e� �d�i�s�p�l�a�y�e�d� �(�i�n� �m�i�l�l�i�s�e�c�o�n�d�s�)�.�
�
�
�
�
�
�E�n�h�a�n�c�e� �y�o�u�r� �R�e�a�c�t� �N�a�t�i�v�e� �a�p�p� �w�i�t�h� �b�e�a�u�t�i�f�u�l� �a�n�d� �c�u�s�t�o�m�i�z�a�b�l�e� �t�o�a�s�t� �m�e�s�s�a�g�e�s� �u�s�i�n�g� �r�e�a�c�t�-�n�a�t�i�v�e�-�t�o�a�s�t�-�m�e�s�s�a�g�e�.�