File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed
components/emcn/components/avatar Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -462,9 +462,6 @@ export default function PlaygroundPage() {
462462 < Avatar size = 'lg' >
463463 < AvatarFallback > LG</ AvatarFallback >
464464 </ Avatar >
465- < Avatar size = 'xl' >
466- < AvatarFallback > XL</ AvatarFallback >
467- </ Avatar >
468465 </ VariantRow >
469466 < VariantRow label = 'with image' >
470467 < Avatar size = 'md' >
@@ -505,9 +502,6 @@ export default function PlaygroundPage() {
505502 < Avatar size = 'lg' status = 'online' >
506503 < AvatarFallback > LG</ AvatarFallback >
507504 </ Avatar >
508- < Avatar size = 'xl' status = 'online' >
509- < AvatarFallback > XL</ AvatarFallback >
510- </ Avatar >
511505 </ VariantRow >
512506 </ Section >
513507
Original file line number Diff line number Diff line change @@ -147,6 +147,12 @@ export function ContextMenu({
147147 disableCreate = false ,
148148 disableCreateFolder = false ,
149149} : ContextMenuProps ) {
150+ // Section visibility for divider logic
151+ const hasNavigationSection = showOpenInNewTab && onOpenInNewTab
152+ const hasEditSection =
153+ ( showRename && onRename ) || ( showCreate && onCreate ) || ( showCreateFolder && onCreateFolder )
154+ const hasCopySection = ( showDuplicate && onDuplicate ) || ( showExport && onExport )
155+
150156 return (
151157 < Popover
152158 open = { isOpen }
@@ -176,7 +182,7 @@ export function ContextMenu({
176182 Open in new tab
177183 </ PopoverItem >
178184 ) }
179- { showOpenInNewTab && onOpenInNewTab && < PopoverDivider /> }
185+ { hasNavigationSection && ( hasEditSection || hasCopySection ) && < PopoverDivider /> }
180186
181187 { /* Edit and create actions */ }
182188 { showRename && onRename && (
@@ -214,7 +220,7 @@ export function ContextMenu({
214220 ) }
215221
216222 { /* Copy and export actions */ }
217- { ( showDuplicate || showExport ) && < PopoverDivider /> }
223+ { hasEditSection && hasCopySection && < PopoverDivider /> }
218224 { showDuplicate && onDuplicate && (
219225 < PopoverItem
220226 disabled = { disableDuplicate }
@@ -239,7 +245,7 @@ export function ContextMenu({
239245 ) }
240246
241247 { /* Destructive action */ }
242- < PopoverDivider />
248+ { ( hasNavigationSection || hasEditSection || hasCopySection ) && < PopoverDivider /> }
243249 < PopoverItem
244250 disabled = { disableDelete }
245251 onClick = { ( ) => {
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ const avatarVariants = cva('relative flex shrink-0 overflow-hidden rounded-full'
1616 sm : 'h-8 w-8' ,
1717 md : 'h-10 w-10' ,
1818 lg : 'h-12 w-12' ,
19- xl : 'h-16 w-16' ,
2019 } ,
2120 } ,
2221 defaultVariants : {
@@ -42,7 +41,6 @@ const avatarStatusVariants = cva(
4241 sm : 'h-2.5 w-2.5' ,
4342 md : 'h-3 w-3' ,
4443 lg : 'h-3.5 w-3.5' ,
45- xl : 'h-4 w-4' ,
4644 } ,
4745 } ,
4846 defaultVariants : {
You can’t perform that action at this time.
0 commit comments