@react-native-reusables/cli 0.4.0 → 0.4.1

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.
Files changed (42) hide show
  1. package/__generated/components/ui/accordion.tsx +53 -44
  2. package/__generated/components/ui/alert-dialog.tsx +96 -84
  3. package/__generated/components/ui/alert.tsx +33 -37
  4. package/__generated/components/ui/avatar.tsx +28 -22
  5. package/__generated/components/ui/badge.tsx +4 -3
  6. package/__generated/components/ui/button.tsx +18 -22
  7. package/__generated/components/ui/card.tsx +70 -43
  8. package/__generated/components/ui/checkbox.tsx +25 -24
  9. package/__generated/components/ui/context-menu.tsx +140 -121
  10. package/__generated/components/ui/dialog.tsx +74 -62
  11. package/__generated/components/ui/dropdown-menu.tsx +147 -126
  12. package/__generated/components/ui/hover-card.tsx +9 -7
  13. package/__generated/components/ui/input.tsx +19 -18
  14. package/__generated/components/ui/label.tsx +13 -6
  15. package/__generated/components/ui/menubar.tsx +164 -141
  16. package/__generated/components/ui/navigation-menu.tsx +68 -58
  17. package/__generated/components/ui/popover.tsx +11 -8
  18. package/__generated/components/ui/progress.tsx +10 -9
  19. package/__generated/components/ui/radio-group.tsx +29 -29
  20. package/__generated/components/ui/select.tsx +58 -40
  21. package/__generated/components/ui/separator.tsx +11 -6
  22. package/__generated/components/ui/switch.tsx +50 -47
  23. package/__generated/components/ui/table.tsx +66 -50
  24. package/__generated/components/ui/tabs.tsx +43 -36
  25. package/__generated/components/ui/text.tsx +17 -15
  26. package/__generated/components/ui/textarea.tsx +24 -21
  27. package/__generated/components/ui/toggle-group.tsx +32 -22
  28. package/__generated/components/ui/toggle.tsx +28 -23
  29. package/__generated/components/ui/tooltip.tsx +31 -26
  30. package/__generated/components/ui/typography.tsx +141 -198
  31. package/__generated/starter-base/app/_layout.tsx +24 -22
  32. package/__generated/starter-base/components/ThemeToggle.tsx +8 -16
  33. package/__generated/starter-base/components/ui/avatar.tsx +30 -28
  34. package/__generated/starter-base/components/ui/button.tsx +18 -25
  35. package/__generated/starter-base/components/ui/card.tsx +61 -36
  36. package/__generated/starter-base/components/ui/progress.tsx +11 -10
  37. package/__generated/starter-base/components/ui/text.tsx +17 -15
  38. package/__generated/starter-base/components/ui/tooltip.tsx +31 -26
  39. package/__generated/starter-base/package.json +1 -3
  40. package/dist/index.js +1 -1
  41. package/dist/index.js.map +1 -1
  42. package/package.json +3 -3
@@ -1,55 +1,82 @@
1
- import type { TextRef, ViewRef } from '@rn-primitives/types';
2
1
  import * as React from 'react';
3
2
  import { Text, type TextProps, View, type ViewProps } from 'react-native';
4
3
  import { cn } from '../../lib/utils';
5
4
  import { TextClassContext } from './text';
6
5
 
7
- const Card = React.forwardRef<ViewRef, ViewProps>(({ className, ...props }, ref) => (
8
- <View
9
- ref={ref}
10
- className={cn(
11
- 'rounded-lg border border-border bg-card shadow-sm shadow-foreground/10',
12
- className
13
- )}
14
- {...props}
15
- />
16
- ));
17
- Card.displayName = 'Card';
6
+ function Card({
7
+ className,
8
+ ...props
9
+ }: ViewProps & {
10
+ ref?: React.RefObject<View>;
11
+ }) {
12
+ return (
13
+ <View
14
+ className={cn(
15
+ 'rounded-lg border border-border bg-card shadow-sm shadow-foreground/10',
16
+ className
17
+ )}
18
+ {...props}
19
+ />
20
+ );
21
+ }
18
22
 
19
- const CardHeader = React.forwardRef<ViewRef, ViewProps>(({ className, ...props }, ref) => (
20
- <View ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />
21
- ));
22
- CardHeader.displayName = 'CardHeader';
23
+ function CardHeader({
24
+ className,
25
+ ...props
26
+ }: ViewProps & {
27
+ ref?: React.RefObject<View>;
28
+ }) {
29
+ return <View className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />;
30
+ }
23
31
 
24
- const CardTitle = React.forwardRef<TextRef, TextProps>(({ className, ...props }, ref) => (
25
- <Text
26
- role='heading'
27
- aria-level={3}
28
- ref={ref}
29
- className={cn(
30
- 'text-2xl text-card-foreground font-semibold leading-none tracking-tight',
31
- className
32
- )}
33
- {...props}
34
- />
35
- ));
36
- CardTitle.displayName = 'CardTitle';
32
+ function CardTitle({
33
+ className,
34
+ ...props
35
+ }: TextProps & {
36
+ ref?: React.RefObject<Text>;
37
+ }) {
38
+ return (
39
+ <Text
40
+ role='heading'
41
+ aria-level={3}
42
+ className={cn(
43
+ 'text-2xl text-card-foreground font-semibold leading-none tracking-tight',
44
+ className
45
+ )}
46
+ {...props}
47
+ />
48
+ );
49
+ }
37
50
 
38
- const CardDescription = React.forwardRef<TextRef, TextProps>(({ className, ...props }, ref) => (
39
- <Text ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />
40
- ));
41
- CardDescription.displayName = 'CardDescription';
51
+ function CardDescription({
52
+ className,
53
+ ...props
54
+ }: TextProps & {
55
+ ref?: React.RefObject<Text>;
56
+ }) {
57
+ return <Text className={cn('text-sm text-muted-foreground', className)} {...props} />;
58
+ }
42
59
 
43
- const CardContent = React.forwardRef<ViewRef, ViewProps>(({ className, ...props }, ref) => (
44
- <TextClassContext.Provider value='text-card-foreground'>
45
- <View ref={ref} className={cn('p-6 pt-0', className)} {...props} />
46
- </TextClassContext.Provider>
47
- ));
48
- CardContent.displayName = 'CardContent';
60
+ function CardContent({
61
+ className,
62
+ ...props
63
+ }: ViewProps & {
64
+ ref?: React.RefObject<View>;
65
+ }) {
66
+ return (
67
+ <TextClassContext.Provider value='text-card-foreground'>
68
+ <View className={cn('p-6 pt-0', className)} {...props} />
69
+ </TextClassContext.Provider>
70
+ );
71
+ }
49
72
 
50
- const CardFooter = React.forwardRef<ViewRef, ViewProps>(({ className, ...props }, ref) => (
51
- <View ref={ref} className={cn('flex flex-row items-center p-6 pt-0', className)} {...props} />
52
- ));
53
- CardFooter.displayName = 'CardFooter';
73
+ function CardFooter({
74
+ className,
75
+ ...props
76
+ }: ViewProps & {
77
+ ref?: React.RefObject<View>;
78
+ }) {
79
+ return <View className={cn('flex flex-row items-center p-6 pt-0', className)} {...props} />;
80
+ }
54
81
 
55
82
  export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
@@ -4,29 +4,30 @@ import { Platform } from 'react-native';
4
4
  import { Check } from '../../lib/icons/Check';
5
5
  import { cn } from '../../lib/utils';
6
6
 
7
- const Checkbox = React.forwardRef<CheckboxPrimitive.RootRef, CheckboxPrimitive.RootProps>(
8
- ({ className, ...props }, ref) => {
9
- return (
10
- <CheckboxPrimitive.Root
11
- ref={ref}
12
- className={cn(
13
- 'web:peer h-4 w-4 native:h-[20] native:w-[20] shrink-0 rounded-sm native:rounded border border-primary web:ring-offset-background web:focus-visible:outline-none web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
14
- props.checked && 'bg-primary',
15
- className
16
- )}
17
- {...props}
18
- >
19
- <CheckboxPrimitive.Indicator className={cn('items-center justify-center h-full w-full')}>
20
- <Check
21
- size={12}
22
- strokeWidth={Platform.OS === 'web' ? 2.5 : 3.5}
23
- className='text-primary-foreground'
24
- />
25
- </CheckboxPrimitive.Indicator>
26
- </CheckboxPrimitive.Root>
27
- );
28
- }
29
- );
30
- Checkbox.displayName = CheckboxPrimitive.Root.displayName;
7
+ function Checkbox({
8
+ className,
9
+ ...props
10
+ }: CheckboxPrimitive.RootProps & {
11
+ ref?: React.RefObject<CheckboxPrimitive.RootRef>;
12
+ }) {
13
+ return (
14
+ <CheckboxPrimitive.Root
15
+ className={cn(
16
+ 'web:peer h-4 w-4 native:h-[20] native:w-[20] shrink-0 rounded-sm native:rounded border border-primary web:ring-offset-background web:focus-visible:outline-none web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
17
+ props.checked && 'bg-primary',
18
+ className
19
+ )}
20
+ {...props}
21
+ >
22
+ <CheckboxPrimitive.Indicator className={cn('items-center justify-center h-full w-full')}>
23
+ <Check
24
+ size={12}
25
+ strokeWidth={Platform.OS === 'web' ? 2.5 : 3.5}
26
+ className='text-primary-foreground'
27
+ />
28
+ </CheckboxPrimitive.Indicator>
29
+ </CheckboxPrimitive.Root>
30
+ );
31
+ }
31
32
 
32
33
  export { Checkbox };
@@ -22,12 +22,16 @@ const ContextMenuGroup = ContextMenuPrimitive.Group;
22
22
  const ContextMenuSub = ContextMenuPrimitive.Sub;
23
23
  const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
24
24
 
25
- const ContextMenuSubTrigger = React.forwardRef<
26
- ContextMenuPrimitive.SubTriggerRef,
27
- ContextMenuPrimitive.SubTriggerProps & {
28
- inset?: boolean;
29
- }
30
- >(({ className, inset, children, ...props }, ref) => {
25
+ function ContextMenuSubTrigger({
26
+ className,
27
+ inset,
28
+ children,
29
+ ...props
30
+ }: ContextMenuPrimitive.SubTriggerProps & {
31
+ ref?: React.RefObject<ContextMenuPrimitive.SubTriggerRef>;
32
+ children?: React.ReactNode;
33
+ inset?: boolean;
34
+ }) {
31
35
  const { open } = ContextMenuPrimitive.useSubContext();
32
36
  const Icon = Platform.OS === 'web' ? ChevronRight : open ? ChevronUp : ChevronDown;
33
37
  return (
@@ -38,7 +42,6 @@ const ContextMenuSubTrigger = React.forwardRef<
38
42
  )}
39
43
  >
40
44
  <ContextMenuPrimitive.SubTrigger
41
- ref={ref}
42
45
  className={cn(
43
46
  'flex flex-row web:cursor-default web:select-none items-center gap-2 web:focus:bg-accent active:bg-accent web:hover:bg-accent rounded-sm px-2 py-1.5 native:py-2 web:outline-none',
44
47
  open && 'bg-accent',
@@ -47,22 +50,22 @@ const ContextMenuSubTrigger = React.forwardRef<
47
50
  )}
48
51
  {...props}
49
52
  >
50
- <>{children}</>
53
+ {children}
51
54
  <Icon size={18} className='ml-auto text-foreground' />
52
55
  </ContextMenuPrimitive.SubTrigger>
53
56
  </TextClassContext.Provider>
54
57
  );
55
- });
56
- ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
58
+ }
57
59
 
58
- const ContextMenuSubContent = React.forwardRef<
59
- ContextMenuPrimitive.SubContentRef,
60
- ContextMenuPrimitive.SubContentProps
61
- >(({ className, ...props }, ref) => {
60
+ function ContextMenuSubContent({
61
+ className,
62
+ ...props
63
+ }: ContextMenuPrimitive.SubContentProps & {
64
+ ref?: React.RefObject<ContextMenuPrimitive.SubContentRef>;
65
+ }) {
62
66
  const { open } = ContextMenuPrimitive.useSubContext();
63
67
  return (
64
68
  <ContextMenuPrimitive.SubContent
65
- ref={ref}
66
69
  className={cn(
67
70
  'z-50 min-w-[8rem] overflow-hidden rounded-md border mt-1 border-border bg-popover p-1 shadow-md shadow-foreground/5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
68
71
  open
@@ -73,17 +76,20 @@ const ContextMenuSubContent = React.forwardRef<
73
76
  {...props}
74
77
  />
75
78
  );
76
- });
77
- ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
79
+ }
78
80
 
79
- const ContextMenuContent = React.forwardRef<
80
- ContextMenuPrimitive.ContentRef,
81
- ContextMenuPrimitive.ContentProps & {
82
- overlayStyle?: StyleProp<ViewStyle>;
83
- overlayClassName?: string;
84
- portalHost?: string;
85
- }
86
- >(({ className, overlayClassName, overlayStyle, portalHost, ...props }, ref) => {
81
+ function ContextMenuContent({
82
+ className,
83
+ overlayClassName,
84
+ overlayStyle,
85
+ portalHost,
86
+ ...props
87
+ }: ContextMenuPrimitive.ContentProps & {
88
+ ref?: React.RefObject<ContextMenuPrimitive.ContentRef>;
89
+ overlayStyle?: StyleProp<ViewStyle>;
90
+ overlayClassName?: string;
91
+ portalHost?: string;
92
+ }) {
87
93
  const { open } = ContextMenuPrimitive.useRootContext();
88
94
  return (
89
95
  <ContextMenuPrimitive.Portal hostName={portalHost}>
@@ -92,7 +98,7 @@ const ContextMenuContent = React.forwardRef<
92
98
  overlayStyle
93
99
  ? StyleSheet.flatten([
94
100
  Platform.OS !== 'web' ? StyleSheet.absoluteFill : undefined,
95
- overlayStyle,
101
+ overlayStyle as typeof StyleSheet.absoluteFill,
96
102
  ])
97
103
  : Platform.OS !== 'web'
98
104
  ? StyleSheet.absoluteFill
@@ -101,7 +107,6 @@ const ContextMenuContent = React.forwardRef<
101
107
  className={overlayClassName}
102
108
  >
103
109
  <ContextMenuPrimitive.Content
104
- ref={ref}
105
110
  className={cn(
106
111
  'z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 shadow-md shadow-foreground/5 web:data-[side=bottom]:slide-in-from-top-2 web:data-[side=left]:slide-in-from-right-2 web:data-[side=right]:slide-in-from-left-2 web:data-[side=top]:slide-in-from-bottom-2',
107
112
  open
@@ -114,107 +119,122 @@ const ContextMenuContent = React.forwardRef<
114
119
  </ContextMenuPrimitive.Overlay>
115
120
  </ContextMenuPrimitive.Portal>
116
121
  );
117
- });
118
- ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
122
+ }
119
123
 
120
- const ContextMenuItem = React.forwardRef<
121
- ContextMenuPrimitive.ItemRef,
122
- ContextMenuPrimitive.ItemProps & {
123
- inset?: boolean;
124
- }
125
- >(({ className, inset, ...props }, ref) => (
126
- <TextClassContext.Provider value='select-none text-sm native:text-lg text-popover-foreground web:group-focus:text-accent-foreground'>
127
- <ContextMenuPrimitive.Item
128
- ref={ref}
124
+ function ContextMenuItem({
125
+ className,
126
+ inset,
127
+ ...props
128
+ }: ContextMenuPrimitive.ItemProps & {
129
+ ref?: React.RefObject<ContextMenuPrimitive.ItemRef>;
130
+ className?: string;
131
+ inset?: boolean;
132
+ }) {
133
+ return (
134
+ <TextClassContext.Provider value='select-none text-sm native:text-lg text-popover-foreground web:group-focus:text-accent-foreground'>
135
+ <ContextMenuPrimitive.Item
136
+ className={cn(
137
+ 'relative flex flex-row web:cursor-default items-center gap-2 rounded-sm px-2 py-1.5 native:py-2 web:outline-none web:focus:bg-accent active:bg-accent web:hover:bg-accent group',
138
+ inset && 'pl-8',
139
+ props.disabled && 'opacity-50 web:pointer-events-none',
140
+ className
141
+ )}
142
+ {...props}
143
+ />
144
+ </TextClassContext.Provider>
145
+ );
146
+ }
147
+
148
+ function ContextMenuCheckboxItem({
149
+ className,
150
+ children,
151
+ ...props
152
+ }: ContextMenuPrimitive.CheckboxItemProps & {
153
+ ref?: React.RefObject<ContextMenuPrimitive.CheckboxItemRef>;
154
+ children?: React.ReactNode;
155
+ }) {
156
+ return (
157
+ <ContextMenuPrimitive.CheckboxItem
129
158
  className={cn(
130
- 'relative flex flex-row web:cursor-default items-center gap-2 rounded-sm px-2 py-1.5 native:py-2 web:outline-none web:focus:bg-accent active:bg-accent web:hover:bg-accent group',
131
- inset && 'pl-8',
132
- props.disabled && 'opacity-50 web:pointer-events-none',
159
+ 'relative flex flex-row web:cursor-default items-center web:group rounded-sm py-1.5 native:py-2 pl-8 pr-2 web:outline-none web:focus:bg-accent active:bg-accent',
160
+ props.disabled && 'web:pointer-events-none opacity-50',
133
161
  className
134
162
  )}
135
163
  {...props}
136
- />
137
- </TextClassContext.Provider>
138
- ));
139
- ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
140
-
141
- const ContextMenuCheckboxItem = React.forwardRef<
142
- ContextMenuPrimitive.CheckboxItemRef,
143
- ContextMenuPrimitive.CheckboxItemProps
144
- >(({ className, children, ...props }, ref) => (
145
- <ContextMenuPrimitive.CheckboxItem
146
- ref={ref}
147
- className={cn(
148
- 'relative flex flex-row web:cursor-default items-center web:group rounded-sm py-1.5 native:py-2 pl-8 pr-2 web:outline-none web:focus:bg-accent active:bg-accent',
149
- props.disabled && 'web:pointer-events-none opacity-50',
150
- className
151
- )}
152
- {...props}
153
- >
154
- <View className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
155
- <ContextMenuPrimitive.ItemIndicator>
156
- <Check size={14} strokeWidth={3} className='text-foreground' />
157
- </ContextMenuPrimitive.ItemIndicator>
158
- </View>
159
- <>{children}</>
160
- </ContextMenuPrimitive.CheckboxItem>
161
- ));
162
- ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
164
+ >
165
+ <View className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
166
+ <ContextMenuPrimitive.ItemIndicator>
167
+ <Check size={14} strokeWidth={3} className='text-foreground' />
168
+ </ContextMenuPrimitive.ItemIndicator>
169
+ </View>
170
+ {children}
171
+ </ContextMenuPrimitive.CheckboxItem>
172
+ );
173
+ }
163
174
 
164
- const ContextMenuRadioItem = React.forwardRef<
165
- ContextMenuPrimitive.RadioItemRef,
166
- ContextMenuPrimitive.RadioItemProps
167
- >(({ className, children, ...props }, ref) => (
168
- <ContextMenuPrimitive.RadioItem
169
- ref={ref}
170
- className={cn(
171
- 'relative flex flex-row web:cursor-default web:group items-center rounded-sm py-1.5 native:py-2 pl-8 pr-2 web:outline-none web:focus:bg-accent active:bg-accent',
172
- props.disabled && 'web:pointer-events-none opacity-50',
173
- className
174
- )}
175
- {...props}
176
- >
177
- <View className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
178
- <ContextMenuPrimitive.ItemIndicator>
179
- <View className='bg-foreground h-2 w-2 rounded-full' />
180
- </ContextMenuPrimitive.ItemIndicator>
181
- </View>
182
- <>{children}</>
183
- </ContextMenuPrimitive.RadioItem>
184
- ));
185
- ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
175
+ function ContextMenuRadioItem({
176
+ className,
177
+ children,
178
+ ...props
179
+ }: ContextMenuPrimitive.RadioItemProps & {
180
+ ref?: React.RefObject<ContextMenuPrimitive.RadioItemRef>;
181
+ children?: React.ReactNode;
182
+ }) {
183
+ return (
184
+ <ContextMenuPrimitive.RadioItem
185
+ className={cn(
186
+ 'relative flex flex-row web:cursor-default web:group items-center rounded-sm py-1.5 native:py-2 pl-8 pr-2 web:outline-none web:focus:bg-accent active:bg-accent',
187
+ props.disabled && 'web:pointer-events-none opacity-50',
188
+ className
189
+ )}
190
+ {...props}
191
+ >
192
+ <View className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
193
+ <ContextMenuPrimitive.ItemIndicator>
194
+ <View className='bg-foreground h-2 w-2 rounded-full' />
195
+ </ContextMenuPrimitive.ItemIndicator>
196
+ </View>
197
+ {children}
198
+ </ContextMenuPrimitive.RadioItem>
199
+ );
200
+ }
186
201
 
187
- const ContextMenuLabel = React.forwardRef<
188
- ContextMenuPrimitive.LabelRef,
189
- ContextMenuPrimitive.LabelProps & {
190
- inset?: boolean;
191
- }
192
- >(({ className, inset, ...props }, ref) => (
193
- <ContextMenuPrimitive.Label
194
- ref={ref}
195
- className={cn(
196
- 'px-2 py-1.5 text-sm native:text-base font-semibold text-foreground web:cursor-default',
197
- inset && 'pl-8',
198
- className
199
- )}
200
- {...props}
201
- />
202
- ));
203
- ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
202
+ function ContextMenuLabel({
203
+ className,
204
+ inset,
205
+ ...props
206
+ }: ContextMenuPrimitive.LabelProps & {
207
+ ref?: React.RefObject<ContextMenuPrimitive.LabelRef>;
208
+ className?: string;
209
+ inset?: boolean;
210
+ }) {
211
+ return (
212
+ <ContextMenuPrimitive.Label
213
+ className={cn(
214
+ 'px-2 py-1.5 text-sm native:text-base font-semibold text-foreground web:cursor-default',
215
+ inset && 'pl-8',
216
+ className
217
+ )}
218
+ {...props}
219
+ />
220
+ );
221
+ }
204
222
 
205
- const ContextMenuSeparator = React.forwardRef<
206
- ContextMenuPrimitive.SeparatorRef,
207
- ContextMenuPrimitive.SeparatorProps
208
- >(({ className, ...props }, ref) => (
209
- <ContextMenuPrimitive.Separator
210
- ref={ref}
211
- className={cn('-mx-1 my-1 h-px bg-border', className)}
212
- {...props}
213
- />
214
- ));
215
- ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
223
+ function ContextMenuSeparator({
224
+ className,
225
+ ...props
226
+ }: ContextMenuPrimitive.SeparatorProps & {
227
+ ref?: React.RefObject<ContextMenuPrimitive.SeparatorRef>;
228
+ }) {
229
+ return (
230
+ <ContextMenuPrimitive.Separator
231
+ className={cn('-mx-1 my-1 h-px bg-border', className)}
232
+ {...props}
233
+ />
234
+ );
235
+ }
216
236
 
217
- const ContextMenuShortcut = ({ className, ...props }: TextProps) => {
237
+ function ContextMenuShortcut({ className, ...props }: TextProps) {
218
238
  return (
219
239
  <Text
220
240
  className={cn(
@@ -224,8 +244,7 @@ const ContextMenuShortcut = ({ className, ...props }: TextProps) => {
224
244
  {...props}
225
245
  />
226
246
  );
227
- };
228
- ContextMenuShortcut.displayName = 'ContextMenuShortcut';
247
+ }
229
248
 
230
249
  export {
231
250
  ContextMenu,