2020-01-17 02:50:57 -07:00
|
|
|
import React from "react";
|
2020-01-20 00:37:04 -07:00
|
|
|
import { Button } from "@chakra-ui/core";
|
2020-01-17 02:50:57 -07:00
|
|
|
import { FiChevronLeft } from "react-icons/fi";
|
|
|
|
|
2020-05-02 13:38:00 -07:00
|
|
|
const ResetButton = React.forwardRef(({ isSubmitting, onClick }, ref) => (
|
|
|
|
<Button
|
|
|
|
ref={ref}
|
|
|
|
aria-label="Reset Form"
|
|
|
|
opacity={isSubmitting ? 1 : 0}
|
|
|
|
variant="ghost"
|
|
|
|
color="current"
|
|
|
|
onClick={onClick}
|
|
|
|
>
|
|
|
|
<FiChevronLeft size={24} />
|
|
|
|
</Button>
|
2020-01-17 02:50:57 -07:00
|
|
|
));
|
2020-05-02 13:38:00 -07:00
|
|
|
|
|
|
|
ResetButton.displayName = "ResetButton";
|
|
|
|
export default ResetButton;
|