Grégoire Delattre 11bc7a13bc
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
Add a button to refresh a show
In the show list and in the show details.
2021-02-04 11:53:24 +01:00

22 lines
548 B
JavaScript

import React from "react";
import PropTypes from "prop-types";
export const Refresh = ({ onClick, loading, kind }) => {
return (
<button onClick={onClick} className={`btn btn-${kind} btn-sm w-md-100 m-1`}>
<i className={`fa ${loading ? "fa-spin" : ""} fa-refresh mr-1`} />
Refresh
</button>
);
};
Refresh.propTypes = {
onClick: PropTypes.func.isRequired,
loading: PropTypes.bool.isRequired,
kind: PropTypes.string.isRequired,
};
Refresh.defaultProps = {
onClick: () => {},
loading: false,
kind: "secondary",
};