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 @@ -465,9 +465,6 @@ export default function PlaygroundPage() {
465465 < Avatar size = 'lg' >
466466 < AvatarFallback > LG</ AvatarFallback >
467467 </ Avatar >
468- < Avatar size = 'xl' >
469- < AvatarFallback > XL</ AvatarFallback >
470- </ Avatar >
471468 </ VariantRow >
472469 < VariantRow label = 'with image' >
473470 < Avatar size = 'md' >
@@ -508,9 +505,6 @@ export default function PlaygroundPage() {
508505 < Avatar size = 'lg' status = 'online' >
509506 < AvatarFallback > LG</ AvatarFallback >
510507 </ Avatar >
511- < Avatar size = 'xl' status = 'online' >
512- < AvatarFallback > XL</ AvatarFallback >
513- </ Avatar >
514508 </ VariantRow >
515509 </ Section >
516510
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