Closed mazipan closed 1 year ago
Currently I just disable the button, it will be nice if we can improve by adding the loader also.
Based on #43, you can use Loader using icon and combined with css animate from tailwind:
e.g: <Loader2 className="animate-spin" />
<Loader2 className="animate-spin" />
For example code like this:
<Button type="submit" disabled={isLoading}> <PaperPlaneIcon className="mr-2 h-4 w-4" /> {isLoading ? 'Sedang mengirim...' : 'Kirim pertanyaan'} </Button>
It better if we do like this:
<Button type="submit" disabled={isLoading}> {isLoading ? ( <> <Loader2 className="mr-2 h-4 w-4 animate-spin" /> <span>Sedang mengirim...</span> </> ) : ( <> <PaperPlaneIcon className="mr-2 h-4 w-4" /> <span>Kirim pertanyaan</span> </> )} </Button>
Hi @mazipan, Do I need to get it assigned first OR shall I raise my PR directly.?
No need, but if you want, just create a draft PR first to reserve the ticket
Currently I just disable the button, it will be nice if we can improve by adding the loader also.
Based on #43, you can use Loader using icon and combined with css animate from tailwind:
e.g:
<Loader2 className="animate-spin" />
For example code like this:
It better if we do like this: