@@ -2,8 +2,8 @@ import { Divider, Flex } from '@chakra-ui/react';
22import { createSelector } from '@reduxjs/toolkit' ;
33import { useAppDispatch , useAppSelector } from 'app/store/storeHooks' ;
44import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions' ;
5- import IAIButton from 'common/components/IAIButton' ;
65import IAICollapse from 'common/components/IAICollapse' ;
6+ import IAIIconButton from 'common/components/IAIIconButton' ;
77import ControlNet from 'features/controlNet/components/ControlNet' ;
88import ParamControlNetFeatureToggle from 'features/controlNet/components/parameters/ParamControlNetFeatureToggle' ;
99import {
@@ -16,6 +16,7 @@ import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
1616import { map } from 'lodash-es' ;
1717import { Fragment , memo , useCallback } from 'react' ;
1818import { useTranslation } from 'react-i18next' ;
19+ import { FaPlus } from 'react-icons/fa' ;
1920import { useGetControlNetModelsQuery } from 'services/api/endpoints/models' ;
2021import { v4 as uuidv4 } from 'uuid' ;
2122
@@ -66,15 +67,33 @@ const ParamControlNetCollapse = () => {
6667 return (
6768 < IAICollapse label = "ControlNet" activeLabel = { activeLabel } >
6869 < Flex sx = { { flexDir : 'column' , gap : 3 } } >
69- < ParamControlNetFeatureToggle />
70- < IAIButton
71- isDisabled = { ! firstModel }
72- flexGrow = { 1 }
73- size = "sm"
74- onClick = { handleClickedAddControlNet }
75- >
76- Add ControlNet
77- </ IAIButton >
70+ < Flex gap = { 2 } alignItems = "center" >
71+ < Flex
72+ sx = { {
73+ flexDirection : 'column' ,
74+ w : '100%' ,
75+ gap : 2 ,
76+ px : 4 ,
77+ py : 2 ,
78+ borderRadius : 4 ,
79+ bg : 'base.200' ,
80+ _dark : {
81+ bg : 'base.850' ,
82+ } ,
83+ } }
84+ >
85+ < ParamControlNetFeatureToggle />
86+ </ Flex >
87+ < IAIIconButton
88+ tooltip = "Add ControlNet"
89+ aria-label = "Add ControlNet"
90+ icon = { < FaPlus /> }
91+ isDisabled = { ! firstModel }
92+ flexGrow = { 1 }
93+ size = "md"
94+ onClick = { handleClickedAddControlNet }
95+ />
96+ </ Flex >
7897 { controlNetsArray . map ( ( c , i ) => (
7998 < Fragment key = { c . controlNetId } >
8099 { i > 0 && < Divider /> }
0 commit comments