jett.admin.npmpackage
v1.0.81
Published
A reusable npm package for JETT Admin UI components.
Keywords
Readme
JETT.Admin.NpmPackage
A reusable npm package for JETT Admin UI components.
📦 Installation & Setup
Build the package
npm run buildLink locally for development
npm linkLink in your project
npm link JETT.Admin.NpmPackageUnlink the package
From the package:
npm unlinkFrom your project:
npm unlink JETT.Admin.NpmPackage🚀 Usage
Import components directly from the package:
import { Button } from "JETT.Admin.NpmPackage";🧭 Sidebar Component
Props
| Prop | Type | Description |
|-------------------|----------|-----------------------------------------------------------------------------|
| sideBarHeading | string | Heading text for the sidebar. |
| navItems | array | Navigation items with icon, label, click action, dropdown, and options. |
| additionalItems | array | Extra items (e.g., support, settings). |
| username | string | Displayed username. |
| role | string | Displayed role. |
Example
import { Sidebar } from "JETT.Admin.NpmPackage";
import { Home, LifeBuoy } from "lucide-react";
export default function App() {
return (
<Sidebar
sideBarHeading="JETT"
navItems={[
{
Icon: Home,
label: "Home",
onClick: () => console.log("Home clicked"),
isDropDown: false,
options: [
{ label: "Sub Item", onClick: () => console.log("Sub clicked") }
]
}
]}
additionalItems={[
{ Icon: LifeBuoy, label: "Support", onClick: () => console.log("Support clicked") }
]}
username="test"
role="test"
/>
);
}📝 Notes
- Use
npm linkonly for local development. - When publishing to npm, install via:
npm install JETT.Admin.NpmPackage
