@aristobyte-ui/dropdown 2.15.3 → 2.16.2

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 CHANGED
@@ -1,6 +1,8 @@
1
1
  # @aristobyte-ui/dropdown
2
2
 
3
3
  <p align="center">
4
+ <img src="https://img.shields.io/npm/v/%40aristobyte-ui%2Fdropdown?style=for-the-badge" alt="NPM version" />
5
+ <img src="https://img.shields.io/npm/dm/%40aristobyte-ui%2Fdropdown?style=for-the-badge" alt="NPM downloads" />
4
6
  <img src="https://img.shields.io/badge/TypeScript-5.8-blue?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript" />
5
7
  <img src="https://img.shields.io/badge/Build-Turbo-green?style=for-the-badge&logo=turbo&logoColor=white" alt="TurboRepo" />
6
8
  <img src="https://img.shields.io/badge/Lint-Strict-red?style=for-the-badge&logo=eslint&logoColor=white" alt="ESLint" />
@@ -30,17 +32,17 @@ pnpm add -D @aristobyte-ui/dropdown
30
32
  ## 🛠 Usage
31
33
 
32
34
  ```tsx
33
- import { Dropdown } from "@aristobyte-ui/dropdown";
34
- import { Button } from "@aristobyte-ui/button";
35
+ import { Dropdown } from '@aristobyte-ui/dropdown';
36
+ import { Button } from '@aristobyte-ui/button';
35
37
 
36
38
  export default function Example() {
37
39
  return (
38
40
  <Dropdown
39
41
  trigger={<Button variant="primary">Options</Button>}
40
42
  items={[
41
- { label: "Profile", onClick: () => console.log("Profile clicked") },
42
- { label: "Settings", onClick: () => console.log("Settings clicked") },
43
- { label: "Logout", onClick: () => console.log("Logout clicked") },
43
+ { label: 'Profile', onClick: () => console.log('Profile clicked') },
44
+ { label: 'Settings', onClick: () => console.log('Settings clicked') },
45
+ { label: 'Logout', onClick: () => console.log('Logout clicked') },
44
46
  ]}
45
47
  placement="bottom-start"
46
48
  disabled={false}
@@ -59,9 +61,9 @@ export default function Example() {
59
61
  ## 🔧 Example in a Package
60
62
 
61
63
  ```tsx
62
- import { Dropdown } from "@aristobyte-ui/dropdown";
63
- import { Button } from "@aristobyte-ui/button";
64
- import { FiSettings, FiUser } from "react-icons/fi";
64
+ import { Dropdown } from '@aristobyte-ui/dropdown';
65
+ import { Button } from '@aristobyte-ui/button';
66
+ import { FiSettings, FiUser } from 'react-icons/fi';
65
67
 
66
68
  export function UserMenu() {
67
69
  return (
@@ -73,16 +75,16 @@ export function UserMenu() {
73
75
  }
74
76
  items={[
75
77
  {
76
- label: "Profile",
78
+ label: 'Profile',
77
79
  icon: FiUser,
78
- onClick: () => console.log("Profile"),
80
+ onClick: () => console.log('Profile'),
79
81
  },
80
82
  {
81
- label: "Settings",
83
+ label: 'Settings',
82
84
  icon: FiSettings,
83
- onClick: () => console.log("Settings"),
85
+ onClick: () => console.log('Settings'),
84
86
  },
85
- { label: "Logout", onClick: () => console.log("Logout") },
87
+ { label: 'Logout', onClick: () => console.log('Logout') },
86
88
  ]}
87
89
  placement="bottom-end"
88
90
  />