github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/ui/dashboard/src/components/dashboards/flows/index.ts (about)

     1  import { getComponent } from "../index";
     2  import { IFlow } from "./types";
     3  const Table = getComponent("table");
     4  
     5  const flowsMap = {};
     6  
     7  const getFlowComponent = (key: string): IFlow => flowsMap[key];
     8  
     9  const registerFlowComponent = (key: string, component: IFlow) => {
    10    flowsMap[key] = component;
    11  };
    12  
    13  const TableWrapper: IFlow = {
    14    type: "table",
    15    component: Table,
    16  };
    17  
    18  registerFlowComponent(TableWrapper.type, TableWrapper);
    19  
    20  export { getFlowComponent, registerFlowComponent };