Files
SCM-Manager/scm-ui/src/admin/plugins/components/MultiPluginAction.js

37 lines
792 B
JavaScript
Raw Normal View History

// @flow
import React from "react";
import { Button } from "@scm-manager/ui-components";
2019-09-30 10:26:32 +02:00
import type { PendingPlugins, PluginCollection } from "@scm-manager/ui-types";
import { translate } from "react-i18next";
export const MultiPluginActionType = {
UPDATE_ALL: "updateAll",
CANCEL_PENDING: "cancelPending",
EXECUTE_PENDING: "executePending"
};
type Props = {
2019-10-01 17:57:38 +02:00
icon: string,
label: string,
2019-10-01 17:03:27 +02:00
onClick: () => void,
};
2019-10-01 17:03:27 +02:00
class MultiPluginAction extends React.Component<Props> {
render() {
2019-10-01 17:57:38 +02:00
const { onClick, icon, label } = this.props;
return (
<>
<Button
color="primary"
2019-09-30 10:26:32 +02:00
reducedMobile={true}
2019-10-01 17:57:38 +02:00
icon={icon}
label={label}
2019-10-01 17:03:27 +02:00
action={() => onClick()}
/>
</>
);
}
}
2019-10-01 17:57:38 +02:00
export default MultiPluginAction;