Submit message button
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { useFormStatus } from 'react-dom';
|
||||
import { FaPaperPlane } from 'react-icons/fa';
|
||||
|
||||
const SubmitMessageButton = () => {
|
||||
const { pending } = useFormStatus();
|
||||
return (
|
||||
<button
|
||||
className='bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-full w-full focus:outline-none focus:shadow-outline flex items-center justify-center'
|
||||
type='submit'
|
||||
disabled={pending}
|
||||
>
|
||||
<FaPaperPlane className='mr-2' />{' '}
|
||||
{pending ? 'Sending...' : 'Send Message'}
|
||||
</button>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user