Skip to content

Modules Structure

Marcus edited this page Feb 14, 2021 · 3 revisions

The latest modules system follows the following basic structure:

(_params) => {
  return {
    functions: { ... },  // For functions that source academy cadets will be interacting with in the IDE.
    sideContents: [ // For generating the side content tabs on cadet-frontend.
      {
        toSpawn: (context) => true,  // Renders component if function returns true
        body: (React) => (props) => { ... }  // Module component that will be rendered in the tab
        label: "Test Component",  // Tooltip string
        iconName: "mugshot",  // Icon for side content tab (uses BlueprintJS icon mame)
      },
    ],
  };
};
Clone this wiki locally