File tree Expand file tree Collapse file tree 6 files changed +68
-11
lines changed
app/(sink)/demo/components Expand file tree Collapse file tree 6 files changed +68
-11
lines changed Original file line number Diff line number Diff line change @@ -106,11 +106,6 @@ export default function page() {
106106 < Menu . Trigger asChild >
107107 < Button > Menu</ Button >
108108 </ Menu . Trigger >
109- { /* <Menu.Trigger asChild>
110- <button className="IconButton" aria-label="Customise options">
111- Click Me
112- </button>
113- </Menu.Trigger> */ }
114109 < Menu . Content className = "min-w-36" >
115110 < Menu . Item > Menu Item 1</ Menu . Item >
116111 < Menu . Item > Menu Item 2</ Menu . Item >
Original file line number Diff line number Diff line change @@ -26,14 +26,19 @@ export const componentConfig = {
2626 name : "card" ,
2727 filePath : "packages/ui/Cards/Card.tsx" ,
2828 } ,
29- text : {
30- name : "text" ,
31- filePath : "packages/ui/Text/Text.tsx" ,
32- } ,
29+
3330 dialog : {
3431 name : "dialog" ,
3532 filePath : "packages/ui/Dialog/Dialog.tsx" ,
3633 } ,
34+ menu : {
35+ name : "menu" ,
36+ filePath : "packages/ui/Menu/Menu.tsx" ,
37+ } ,
38+ text : {
39+ name : "text" ,
40+ filePath : "packages/ui/Text/Text.tsx" ,
41+ } ,
3742 } ,
3843 examples : {
3944 "accordion-style-default" : {
@@ -134,6 +139,11 @@ export const componentConfig = {
134139 filePath : "preview/components/input-style-default.tsx" ,
135140 preview : lazy ( ( ) => import ( "@/preview/components/input-style-default" ) ) ,
136141 } ,
142+ "menu-style-default" : {
143+ name : "menu-style-default" ,
144+ filePath : "preview/components/menu-style-default.tsx" ,
145+ preview : lazy ( ( ) => import ( "@/preview/components/menu-style-default" ) ) ,
146+ } ,
137147 "textarea-style-default" : {
138148 name : "textarea-style-default" ,
139149 filePath : "preview/components/textarea-style-default.tsx" ,
Original file line number Diff line number Diff line change @@ -22,11 +22,12 @@ export const navConfig: INavigationConfig = {
2222 { title : "Badge" , href : `${ componentsRoute } /badge` } ,
2323 { title : "Button" , href : `${ componentsRoute } /button` } ,
2424 { title : "Card" , href : `${ componentsRoute } /card` } ,
25+ { title : "Dialog" , href : `${ componentsRoute } /dialog` } ,
2526 { title : "Input" , href : `${ componentsRoute } /input` } ,
27+ { title : "Menu" , href : `${ componentsRoute } /menu` } ,
2628 { title : "Tab" , href : `${ componentsRoute } /tab` } ,
2729 { title : "Textarea" , href : `${ componentsRoute } /textarea` } ,
2830 { title : "Text" , href : `${ componentsRoute } /text` } ,
29- { title : "Dialog" , href : `${ componentsRoute } /dialog` } ,
3031 ] ,
3132 } ,
3233 {
Original file line number Diff line number Diff line change 1+ ---
2+ title : Menu
3+ description : Show your users a list of actions they can take. 📋
4+ lastUpdated : 19 Oct, 2024
5+ links :
6+ api_reference : https://www.radix-ui.com/primitives/docs/components/dropdown-menu#api-reference
7+ source : https://github.com/Logging-Stuff/RetroUI/blob/main/packages/ui/Menu/Menu.tsx
8+ ---
9+
10+ <ComponentShowcase name = " menu-style-default" />
11+ <br />
12+ <br />
13+
14+ ## Installation
15+
16+ #### 1. Install dependencies:
17+
18+ ``` sh
19+ npm install @radix-ui/react-dropdown-menu
20+ ```
21+
22+ <br />
23+
24+ #### 2. Copy the code 👇 into your project:
25+
26+ <ComponentSource name = " menu" />
27+
28+ <br />
29+ <br />
30+
31+ ## Examples
32+
33+ ### Default
34+
35+ <ComponentShowcase name = " menu-style-default" />
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const Content = ({ className, ...props }: IMenuContent) => (
2727
2828const MenuItem = ( props : any ) => (
2929 < DropdownMenu . Item
30- className = "p-2 hover:bg-primary-300 outline-none cursor-pointer "
30+ className = "p-2 hover:bg-primary-400 outline-none cursor-pointer "
3131 { ...props }
3232 />
3333) ;
Original file line number Diff line number Diff line change 1+ import { Button , Menu } from "@/packages/ui" ;
2+
3+ export default function MenuDefault ( ) {
4+ return (
5+ < Menu >
6+ < Menu . Trigger asChild >
7+ < Button > Menu</ Button >
8+ </ Menu . Trigger >
9+ < Menu . Content className = "min-w-36" >
10+ < Menu . Item > Menu Item 1</ Menu . Item >
11+ < Menu . Item > Menu Item 2</ Menu . Item >
12+ < Menu . Item > Menu Item 3</ Menu . Item >
13+ </ Menu . Content >
14+ </ Menu >
15+ ) ;
16+ }
You can’t perform that action at this time.
0 commit comments