resources/clients/react/elwing/README.md
Elwing is a bootstrapped companion app to the Cloudscape design system. Its opinionated layout accelerates development time by exposing a simple plugin API. Developers can use the plugin API to focus on defining pages and content instead of app structure.
npm i from the same directory as this readme.npm start.A plugin is a JavaScript Object that contains the following properties:
navigationItem - A Cloudscape SideNavigationProps object.component - The component that displays when choosing the link in the sidebar.The automated steps overwrite the manifest.ts file with the latest
plugins from the plugins directory.
A convenience script is included to support quick plugin creation.
npm run create-plugin <plugin-name>.plugins directory.You can choose to create a plugin manually instead of using the script.
my-plugin.index.ts file to the folder. Refer to the following example to populate the file.const MyPlugin = {
navigationItem: {
text: "My Plugin",
href: "/my_plugin",
type: "expandable-link-group",
items: [{
type: "link",
text: "Cloudscape Design System",
href: "https://cloudscape.design/",
external: true
}],
} as SideNavigationProps.ExpandableLinkGroup,
component: lazy(() => import("./src/MyPluginComponent")),
};
export { MyPlugin };
MyPlugin.tsx file to the folder and populate it with component code.const Component = () => <h1>Hello, my-component!</h1>;
export default Component;
plugins/manifest.ts and add your plugin to the plugins array.import { AppPlugin } from "./AppPlugin";
import { MyPlugin } from "./my-plugin";
const plugins: AppPlugin[] = [MyPlugin];
export default plugins;
rm -rf node_modules/.cache.