react-upload-button-v2
v0.6.1
Published
Upload Button
Downloads
43
Readme
��#�#� �S�y�n�o�p�s�i�s�
�
�
�
�A� �R�e�a�c�t� �C�o�m�p�o�n�e�n�t� �f�o�r� �a�n� �u�p�l�o�a�d� �b�u�t�t�o�n� �w�h�i�c�h� �a�l�l�o�w�s� �f�o�r� �c�u�s�t�o�m� �s�t�y�l�i�n�g�.� �
�
�
�
�#�#� �C�o�d�e� �E�x�a�m�p�l�e�
�
�
�
�D�o�w�n�l�o�a�d� �f�r�o�m� �N�P�M� ��n�p�m� �i�n�s�t�a�l�l� �r�e�a�c�t�-�u�p�l�o�a�d�-�b�u�t�t�o�n�-�v�2� �-�-�s�a�v�e�
�
�
�
�
�T�h�e�n� �i�n�c�l�u�d�e� �t�h�e� �c�o�m�p�o�n�e�n�t� �i�n�t�o� �y�o�u�r� �r�e�a�c�t� �l�i�k�e� �s�o�:�
�
��
��j�a�v�a�s�c�r�i�p�t�
�
�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� �{� �r�e�n�d�e�r� �}� �f�r�o�m� �'�r�e�a�c�t�-�d�o�m�'�;�
�
�i�m�p�o�r�t� �U�p�l�o�a�d�B�u�t�t�o�n� �f�r�o�m� �'�.�/�.�.�/�b�u�i�l�d�/�C�o�m�p�o�n�e�n�t�.�j�s�'�;�
�
�
�
�f�u�n�c�t�i�o�n� �h�a�n�d�l�e�C�h�a�n�g�e�(�i�n�p�u�t�)� �{�
�
� � �/�/� �e�s�l�i�n�t�-�d�i�s�a�b�l�e�-�n�e�x�t�-�l�i�n�e� �n�o�-�c�o�n�s�o�l�e�
�
� � �c�o�n�s�o�l�e�.�l�o�g�(�
�U�p�l�o�a�d�e�d� �F�i�l�e� �C�h�a�n�g�e�d�:� �$�{�i�n�p�u�t�.�v�a�l�u�e�}��)�;�
�
�}�
�
�
�
�r�e�n�d�e�r�(�
�
� � �<�U�p�l�o�a�d�B�u�t�t�o�n�
�
� � � � �s�t�y�l�e�s�=�{�{� �w�i�d�t�h�:� �'�1�0�e�m�'� �}�}�
�
� � � � �c�l�a�s�s�N�a�m�e�=�"�b�t�n� �s�m�p�l�e� �b�-�g�r�y�7� �w�h�t�e� �t�x�t�c�"�
�
� � � � �o�n�C�h�a�n�g�e�=�{�h�a�n�d�l�e�C�h�a�n�g�e�}�
�
� � �>�
�
� � � � �<�p� �c�l�a�s�s�N�a�m�e�=�"�w�h�t�e�"�>�U�p�l�o�a�d�<�/�p�>�
�
� � �<�/�U�p�l�o�a�d�B�u�t�t�o�n�>�,�
�
� � �d�o�c�u�m�e�n�t�.�g�e�t�E�l�e�m�e�n�t�B�y�I�d�(�'�e�n�t�r�y�'�)�
�
�)�;�
�
�
��
�
�
�
�
�#�#� �G�e�t� �S�t�a�r�t�e�d�
�
�
�
�D�o�w�n�l�o�a�d� �f�r�o�m� �N�P�M� ��n�p�m� �i�n�s�t�a�l�l� �r�e�a�c�t�-�u�p�l�o�a�d�-�b�u�t�t�o�n�-�v�2� �-�-�s�a�v�e�
�
�
�
�
�#�#� �M�o�t�i�v�a�t�i�o�n� �
�
�
�
�h�t�t�p�:�/�/�s�t�a�c�k�o�v�e�r�f�l�o�w�.�c�o�m�/�q�u�e�s�t�i�o�n�s�/�2�1�8�4�2�2�7�4�/�c�r�o�s�s�-�b�r�o�w�s�e�r�-�c�u�s�t�o�m�-�s�t�y�l�i�n�g�-�f�o�r�-�f�i�l�e�-�u�p�l�o�a�d�-�b�u�t�t�o�n�
�
�
�
�I�t� �i�s� �n�o�t�o�r�i�o�u�s�l�y� �a�n�n�o�y�i�n�g� �t�o� �w�o�r�k� �w�i�t�h� �a� �s�i�m�p�l�e� �u�p�l�o�a�d� �b�u�t�t�o�n� �o�n� �t�h�e� �w�e�b�.�
�
�
�
�#�#� �L�i�c�e�n�s�e�
�
�
�
�M�I�T�