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

     1  import { ReactNode } from "react";
     2  
     3  const componentsMap = {};
     4  
     5  const getComponent = (key: string) => componentsMap[key];
     6  
     7  const registerComponent = (
     8    key: string,
     9    component: (props: any) => ReactNode
    10  ) => {
    11    componentsMap[key] = component;
    12  };
    13  
    14  export { getComponent, registerComponent };