A reusable npm package for JETT Admin UI components.
npm install jett.admin.npmpackagebash
npm run build
`
$3
`bash
npm link
`
$3
`bash
npm link JETT.Admin.NpmPackage
`
$3
From the package:
`bash
npm unlink
`
From your project:
`bash
npm unlink JETT.Admin.NpmPackage
`
---
🚀 Usage
Import components directly from the package:
`tsx
import { Button } from "JETT.Admin.NpmPackage";
`
---
🧭 Sidebar Component
$3
| 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. |
---
$3
`tsx
import { Sidebar } from "JETT.Admin.NpmPackage";
import { Home, LifeBuoy } from "lucide-react";
export default function App() {
return (
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 link only for local development.
- When publishing to npm, install via:
`bash
npm install JETT.Admin.NpmPackage
``