mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-09 06:55:03 +00:00
* feat: replace request send icon with Send/Cancel buttons --------- Co-authored-by: naman-bruno <naman@usebruno.com>
23 lines
605 B
JavaScript
23 lines
605 B
JavaScript
import React from 'react';
|
|
import Button from 'ui/Button';
|
|
import StyledWrapper from './StyledWrapper';
|
|
|
|
const SendButton = ({ isLoading = false, onSend, onCancel, testId = 'send-request-btn' }) => {
|
|
return (
|
|
<StyledWrapper className="ml-2">
|
|
<Button
|
|
size="sm"
|
|
variant={isLoading ? 'outline' : 'filled'}
|
|
color="primary"
|
|
data-testid={testId}
|
|
data-action={isLoading ? 'cancel' : 'send'}
|
|
onClick={isLoading ? onCancel : onSend}
|
|
>
|
|
{isLoading ? 'Cancel' : 'Send'}
|
|
</Button>
|
|
</StyledWrapper>
|
|
);
|
|
};
|
|
|
|
export default SendButton;
|