File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
invokeai/frontend/web/src/features/dnd Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11import type { SystemStyleObject } from '@invoke-ai/ui-library' ;
22import { Flex , Text } from '@invoke-ai/ui-library' ;
33import type { DndTargetState } from 'features/dnd/types' ;
4+ import { isNil , isString } from 'lodash-es' ;
5+ import type { ReactNode } from 'react' ;
46import { memo } from 'react' ;
57
68type Props = {
79 dndState : DndTargetState ;
8- label ?: string ;
10+ label ?: string | ReactNode ;
911 withBackdrop ?: boolean ;
1012} ;
1113
@@ -74,7 +76,8 @@ export const DndDropOverlay = memo((props: Props) => {
7476 < Flex className = "dnd-drop-overlay" data-dnd-state = { dndState } sx = { sx } >
7577 { withBackdrop && < Flex className = "dnd-drop-overlay-backdrop" /> }
7678 < Flex className = "dnd-drop-overlay-content" >
77- { label && < Text className = "dnd-drop-overlay-label" > { label } </ Text > }
79+ { isString ( label ) && < Text className = "dnd-drop-overlay-label" > { label } </ Text > }
80+ { ! isNil ( label ) && ! isString ( label ) && label }
7881 </ Flex >
7982 </ Flex >
8083 ) ;
You can’t perform that action at this time.
0 commit comments