File tree 2 files changed +34
-28
lines changed
invokeai/frontend/web/src/features/nodes/components/sidePanel/builder
2 files changed +34
-28
lines changed Original file line number Diff line number Diff line change 9
9
PopoverBody ,
10
10
PopoverContent ,
11
11
PopoverTrigger ,
12
+ Portal ,
12
13
} from '@invoke-ai/ui-library' ;
13
14
import { useAppDispatch } from 'app/store/storeHooks' ;
14
15
import { formElementContainerDataChanged } from 'features/nodes/store/workflowSlice' ;
@@ -36,22 +37,24 @@ export const ContainerElementSettings = memo(({ element }: { element: ContainerE
36
37
< PopoverTrigger >
37
38
< IconButton aria-label = "settings" icon = { < PiWrenchFill /> } variant = "link" size = "sm" alignSelf = "stretch" />
38
39
</ PopoverTrigger >
39
- < PopoverContent >
40
- < PopoverArrow />
41
- < PopoverBody >
42
- < FormControl >
43
- < FormLabel m = { 0 } > { t ( 'workflows.builder.layout' ) } </ FormLabel >
44
- < ButtonGroup variant = "outline" size = "sm" >
45
- < Button onClick = { setLayoutToRow } colorScheme = { layout === 'row' ? 'invokeBlue' : 'base' } >
46
- { t ( 'workflows.builder.row' ) }
47
- </ Button >
48
- < Button onClick = { setLayoutToColumn } colorScheme = { layout === 'column' ? 'invokeBlue' : 'base' } >
49
- { t ( 'workflows.builder.column' ) }
50
- </ Button >
51
- </ ButtonGroup >
52
- </ FormControl >
53
- </ PopoverBody >
54
- </ PopoverContent >
40
+ < Portal >
41
+ < PopoverContent >
42
+ < PopoverArrow />
43
+ < PopoverBody >
44
+ < FormControl >
45
+ < FormLabel m = { 0 } > { t ( 'workflows.builder.layout' ) } </ FormLabel >
46
+ < ButtonGroup variant = "outline" size = "sm" >
47
+ < Button onClick = { setLayoutToRow } colorScheme = { layout === 'row' ? 'invokeBlue' : 'base' } >
48
+ { t ( 'workflows.builder.row' ) }
49
+ </ Button >
50
+ < Button onClick = { setLayoutToColumn } colorScheme = { layout === 'column' ? 'invokeBlue' : 'base' } >
51
+ { t ( 'workflows.builder.column' ) }
52
+ </ Button >
53
+ </ ButtonGroup >
54
+ </ FormControl >
55
+ </ PopoverBody >
56
+ </ PopoverContent >
57
+ </ Portal >
55
58
</ Popover >
56
59
) ;
57
60
} ) ;
Original file line number Diff line number Diff line change 7
7
PopoverBody ,
8
8
PopoverContent ,
9
9
PopoverTrigger ,
10
+ Portal ,
10
11
Switch ,
11
12
} from '@invoke-ai/ui-library' ;
12
13
import { useAppDispatch } from 'app/store/storeHooks' ;
@@ -65,18 +66,20 @@ export const NodeFieldElementSettings = memo(({ element }: { element: NodeFieldE
65
66
< PopoverTrigger >
66
67
< IconButton aria-label = "settings" icon = { < PiWrenchFill /> } variant = "link" size = "sm" alignSelf = "stretch" />
67
68
</ PopoverTrigger >
68
- < PopoverContent >
69
- < PopoverArrow />
70
- < PopoverBody minW = { 48 } >
71
- < FormControl >
72
- < FormLabel flex = { 1 } > { t ( 'workflows.builder.showDescription' ) } </ FormLabel >
73
- < Switch size = "sm" isChecked = { showDescription } onChange = { toggleShowDescription } />
74
- </ FormControl >
75
- { settings ?. type === 'integer-field-config' && < NodeFieldElementIntegerConfig id = { id } config = { settings } /> }
76
- { settings ?. type === 'float-field-config' && < NodeFieldElementFloatSettings id = { id } config = { settings } /> }
77
- { settings ?. type === 'string-field-config' && < NodeFieldElementStringSettings id = { id } config = { settings } /> }
78
- </ PopoverBody >
79
- </ PopoverContent >
69
+ < Portal >
70
+ < PopoverContent >
71
+ < PopoverArrow />
72
+ < PopoverBody minW = { 48 } >
73
+ < FormControl >
74
+ < FormLabel flex = { 1 } > { t ( 'workflows.builder.showDescription' ) } </ FormLabel >
75
+ < Switch size = "sm" isChecked = { showDescription } onChange = { toggleShowDescription } />
76
+ </ FormControl >
77
+ { settings ?. type === 'integer-field-config' && < NodeFieldElementIntegerConfig id = { id } config = { settings } /> }
78
+ { settings ?. type === 'float-field-config' && < NodeFieldElementFloatSettings id = { id } config = { settings } /> }
79
+ { settings ?. type === 'string-field-config' && < NodeFieldElementStringSettings id = { id } config = { settings } /> }
80
+ </ PopoverBody >
81
+ </ PopoverContent >
82
+ </ Portal >
80
83
</ Popover >
81
84
) ;
82
85
} ) ;
You can’t perform that action at this time.
0 commit comments