@edemcyber/easy-peasy-ui
v1.2.2
Published
Shared UI components for Easy Peasy apps
Maintainers
Readme
@easy-peasy/ui
Shared UI components for Easy Peasy apps.
Installation
npm install @easy-peasy/ui
# or
yarn add @easy-peasy/ui
# or
pnpm add @easy-peasy/uiUsage
AppSwitcher
Add the app switcher to your sidebar:
import { AppSwitcher, DEFAULT_APPS } from "@easy-peasy/ui";
// In your sidebar component
<AppSwitcher
currentAppId="requisition" // Current app ID
apps={DEFAULT_APPS} // Or pass your own app list
portalUrl="https://portal.easypeasy.com"
variant="default" // or "compact"
/>Custom Apps
You can pass a custom list of apps:
import { AppSwitcher, type AppDefinition } from "@easy-peasy/ui";
const myApps: AppDefinition[] = [
{
id: "requisition",
name: "Requisitions",
description: "Purchase requests & approvals",
url: "https://req.easypeasy.com",
icon: "FileText",
status: "live",
},
// ... more apps
];
<AppSwitcher currentAppId="requisition" apps={myApps} />Development
# Build the package
npm run build
# Watch mode
npm run devIcons
The following icons are supported (from Lucide):
FileText- Document/RequisitionsStore- Store/ShopPackage- InventoryUsers- HR/PeopleBarChart3- Analytics
