2019-07-04 17:31:15 +02:00
|
|
|
//@flow
|
|
|
|
|
import React from "react";
|
2019-07-09 13:29:25 +02:00
|
|
|
import { CardColumnGroup } from "@scm-manager/ui-components";
|
|
|
|
|
import type { PluginGroup } from "@scm-manager/ui-types";
|
2019-07-04 17:31:15 +02:00
|
|
|
import PluginEntry from "./PluginEntry";
|
|
|
|
|
|
|
|
|
|
type Props = {
|
2019-08-21 15:07:56 +02:00
|
|
|
group: PluginGroup,
|
|
|
|
|
refresh: () => void
|
2019-07-04 17:31:15 +02:00
|
|
|
};
|
|
|
|
|
|
2019-07-09 13:29:25 +02:00
|
|
|
class PluginGroupEntry extends React.Component<Props> {
|
2019-07-04 17:31:15 +02:00
|
|
|
render() {
|
2019-08-21 15:07:56 +02:00
|
|
|
const { group, refresh } = this.props;
|
|
|
|
|
const entries = group.plugins.map(plugin => {
|
|
|
|
|
return <PluginEntry plugin={plugin} key={plugin.name} refresh={refresh} />;
|
2019-07-09 13:29:25 +02:00
|
|
|
});
|
|
|
|
|
return <CardColumnGroup name={group.name} elements={entries} />;
|
2019-07-04 17:31:15 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-07-09 13:29:25 +02:00
|
|
|
export default PluginGroupEntry;
|