jett.admin.npmpackage 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,99 @@
1
+ # JETT.Admin.NpmPackage
2
+
3
+ A reusable npm package for JETT Admin UI components.
4
+
5
+ ---
6
+
7
+ ## 📦 Installation & Setup
8
+
9
+ ### Build the package
10
+ ```bash
11
+ npm run build
12
+ ```
13
+
14
+ ### Link locally for development
15
+ ```bash
16
+ npm link
17
+ ```
18
+
19
+ ### Link in your project
20
+ ```bash
21
+ npm link JETT.Admin.NpmPackage
22
+ ```
23
+
24
+ ### Unlink the package
25
+ From the package:
26
+ ```bash
27
+ npm unlink
28
+ ```
29
+
30
+ From your project:
31
+ ```bash
32
+ npm unlink JETT.Admin.NpmPackage
33
+ ```
34
+
35
+ ---
36
+
37
+ ## 🚀 Usage
38
+
39
+ Import components directly from the package:
40
+
41
+ ```tsx
42
+ import { Button } from "JETT.Admin.NpmPackage";
43
+ ```
44
+
45
+ ---
46
+
47
+ ## 🧭 Sidebar Component
48
+
49
+ ### Props
50
+
51
+ | Prop | Type | Description |
52
+ |-------------------|----------|-----------------------------------------------------------------------------|
53
+ | `sideBarHeading` | string | Heading text for the sidebar. |
54
+ | `navItems` | array | Navigation items with icon, label, click action, dropdown, and options. |
55
+ | `additionalItems` | array | Extra items (e.g., support, settings). |
56
+ | `username` | string | Displayed username. |
57
+ | `role` | string | Displayed role. |
58
+
59
+ ---
60
+
61
+ ### Example
62
+
63
+ ```tsx
64
+ import { Sidebar } from "JETT.Admin.NpmPackage";
65
+ import { Home, LifeBuoy } from "lucide-react";
66
+
67
+ export default function App() {
68
+ return (
69
+ <Sidebar
70
+ sideBarHeading="JETT"
71
+ navItems={[
72
+ {
73
+ Icon: Home,
74
+ label: "Home",
75
+ onClick: () => console.log("Home clicked"),
76
+ isDropDown: false,
77
+ options: [
78
+ { label: "Sub Item", onClick: () => console.log("Sub clicked") }
79
+ ]
80
+ }
81
+ ]}
82
+ additionalItems={[
83
+ { Icon: LifeBuoy, label: "Support", onClick: () => console.log("Support clicked") }
84
+ ]}
85
+ username="test"
86
+ role="test"
87
+ />
88
+ );
89
+ }
90
+ ```
91
+
92
+ ---
93
+
94
+ ## 📝 Notes
95
+ - Use `npm link` only for local development.
96
+ - When publishing to npm, install via:
97
+ ```bash
98
+ npm install JETT.Admin.NpmPackage
99
+ ```