@@ -42,13 +42,15 @@ const ColorTypeBtns = ({
4242 onClick = { setSolid }
4343 id = "rbgcp-solid-btn"
4444 style = { colorTypeBtnStyles ( ! isGradient , defaultStyles ) }
45+ // className="rbgcp-control-btn rbgcp-solid-btn"
4546 >
4647 { locales ?. CONTROLS ?. SOLID }
4748 </ div >
4849 < div
4950 onClick = { setGradient }
5051 id = "rbgcp-gradient-btn"
51- style = { colorTypeBtnStyles ( isGradient || false , defaultStyles ) }
52+ style = { colorTypeBtnStyles ( isGradient ?? false , defaultStyles ) }
53+ // className="rbgcp-control-btn rbgcp-gradient-btn"
5254 >
5355 { locales ?. CONTROLS ?. GRADIENT }
5456 </ div >
@@ -85,6 +87,7 @@ const InputTypeDropdown = ({
8587
8688 return (
8789 < div
90+ // className="rbgcp-color-model-dropdown"
8891 style = { {
8992 visibility : openInputType ? 'visible' : 'hidden' ,
9093 zIndex : openInputType ? '' : - 100 ,
@@ -153,8 +156,8 @@ const Controls = ({
153156 const noTools =
154157 hideEyeDrop && hideAdvancedSliders && hideColorGuide && hideInputType
155158
156- const solidColor = previous ?. color || defaultColor
157- const gradientColor = previous ?. gradient || defaultGradient
159+ const solidColor = previous ?. color ?? defaultColor
160+ const gradientColor = previous ?. gradient ?? defaultGradient
158161
159162 const setSolid = ( ) => {
160163 onChange ( solidColor )
@@ -190,6 +193,7 @@ const Controls = ({
190193 alignItems : 'center' ,
191194 justifyContent : 'space-between' ,
192195 } }
196+ // className="rbgcp-controls-wrapper"
193197 >
194198 < ColorTypeBtns
195199 hideColorTypeBtns = { hideColorTypeBtns }
@@ -205,42 +209,43 @@ const Controls = ({
205209 display : noTools ? 'none' : '' ,
206210 ...defaultStyles . rbgcpControlBtnWrapper ,
207211 } }
212+ // className="rbgcp-control-btn-wrapper"
208213 >
209214 { ! hideEyeDrop && < EyeDropper onSelect = { handleChange } /> }
210- < div
211- id = "rbgcp-advanced-btn"
212- onClick = { ( ) => setOpenAdvanced ( ! openAdvanced ) }
213- style = { {
214- display : hideAdvancedSliders ? 'none' : 'flex' ,
215- ... controlBtnStyles ( openAdvanced , defaultStyles ) ,
216- } }
217- >
218- < SlidersIcon color = { openAdvanced ? '#568CF5' : '' } / >
219- </ div >
220- < div
221- id = "rbgcp-comparibles-btn"
222- style = { {
223- display : hideColorGuide ? 'none' : 'flex' ,
224- ... controlBtnStyles ( openComparibles , defaultStyles ) ,
225- } }
226- onClick = { ( ) => setOpenComparibles ( ! openComparibles ) }
227- >
228- < PaletteIcon color = { openComparibles ? '#568CF5' : '' } / >
229- </ div >
230- < div
231- id = "rbgcp-color-model-btn"
232- onClick = { ( ) => setOpenInputType ( ! openInputType ) }
233- style = { {
234- display : hideInputType ? 'none' : 'flex' ,
235- ... controlBtnStyles ( openInputType , defaultStyles ) ,
236- } }
237- >
238- < InputsIcon color = { openInputType ? '#568CF5' : '' } />
239- < InputTypeDropdown
240- openInputType = { openInputType }
241- setOpenInputType = { setOpenInputType }
242- / >
243- </ div >
215+ { ! hideAdvancedSliders && (
216+ < div
217+ id = "rbgcp-advanced-btn"
218+ onClick = { ( ) => setOpenAdvanced ( ! openAdvanced ) }
219+ // className="rbgcp-control-btn rbgcp-advanced-btn"
220+ style = { controlBtnStyles ( openAdvanced , defaultStyles ) }
221+ >
222+ < SlidersIcon color = { openAdvanced ? '#568CF5' : '' } / >
223+ </ div >
224+ ) }
225+ { ! hideColorGuide && (
226+ < div
227+ style = { controlBtnStyles ( openComparibles , defaultStyles ) }
228+ onClick = { ( ) => setOpenComparibles ( ! openComparibles ) }
229+ // className="rbgcp-control-btn rbgcp-comparibles-btn"
230+ id = "rbgcp-comparibles-btn"
231+ >
232+ < PaletteIcon color = { openComparibles ? '#568CF5' : '' } / >
233+ </ div >
234+ ) }
235+ { ! hideInputType && (
236+ < div
237+ id = "rbgcp-color-model-btn"
238+ onClick = { ( ) => setOpenInputType ( ! openInputType ) }
239+ // className="rbgcp-control-btn rbgcp-color-model-btn"
240+ style = { controlBtnStyles ( openInputType , defaultStyles ) }
241+ >
242+ < InputsIcon color = { openInputType ? '#568CF5' : '' } / >
243+ < InputTypeDropdown
244+ openInputType = { openInputType }
245+ setOpenInputType = { setOpenInputType }
246+ />
247+ </ div >
248+ ) }
244249 </ div >
245250 ) }
246251 </ div >
0 commit comments