@veecode-platform/plugin-kong-service-manager
Version:
24 lines (21 loc) • 1.18 kB
JavaScript
import React from 'react';
import { Content } from '@backstage/core-components';
import { AllPlugins } from './AllPlugins/AllPlugins.esm.js';
import { usePluginsCardsStyles } from './styles.esm.js';
import { AssociatedPlugins } from './AssociatedPlugins/AssociatedPlugins.esm.js';
import { DrawerComponent } from '../DrawerComponent/DrawerComponent.esm.js';
const PluginsCardsWrapper = (props) => {
const { children } = props;
const { content } = usePluginsCardsStyles();
return /* @__PURE__ */ React.createElement(Content, { className: content }, /* @__PURE__ */ React.createElement(DrawerComponent, null), children);
};
const PluginsCards = (props) => {
const { filterByAssociated, listAllPlugins, associatedPluginsName } = props;
React.useEffect(() => {
listAllPlugins();
}, [associatedPluginsName]);
if (filterByAssociated) return /* @__PURE__ */ React.createElement(PluginsCardsWrapper, null, /* @__PURE__ */ React.createElement(AssociatedPlugins, null));
return /* @__PURE__ */ React.createElement(PluginsCardsWrapper, null, /* @__PURE__ */ React.createElement(AllPlugins, null));
};
export { PluginsCards };
//# sourceMappingURL=PluginsCards.esm.js.map