@@ -32,6 +32,7 @@ import { sprintf, __ } from '@wordpress/i18n'
3232import { useBlockColorSchemes } from '~stackable/hooks'
3333import ColorSchemePreview from '../color-scheme-preview'
3434import { ColorSchemesHelp } from '../color-schemes-help'
35+ import Tooltip from '../tooltip'
3536
3637const PLAN_OPTIONS = [ { key : '' , label : __ ( 'All' , i18n ) } , { key : 'free' , label : __ ( 'Free' , i18n ) } , { key : 'premium' , label : __ ( 'Premium' , i18n ) } ]
3738const popoverProps = {
@@ -197,13 +198,22 @@ export const ModalDesignLibrary = props => {
197198 < h4 style = { { margin : '0 0 1em ' } } > { __ ( 'Style Options' , i18n ) } </ h4 >
198199 < ToggleControl
199200 className = "ugb-modal-design-library__enable-background"
200- label = "Section Background"
201+ label = { < Tooltip placement = "top" text = { < a href = "https://docs.wpstackable.com/article/343-using-the-design-library#Section-Background-KYOys" target = "_docs" >
202+ { __ ( 'Learn more about section background here.' , i18n ) }
203+ </ a > } >
204+ < span className = "stk-control__label--has-tooltip" > { __ ( 'Section Background' , i18n ) } </ span >
205+ </ Tooltip > }
201206 checked = { enableBackground }
202207 onChange = { value => {
203208 setEnableBackground ( value )
204209 } }
205210 />
206- < BaseControl label = { `${ __ ( 'Background Scheme' , i18n ) } ` }
211+ < BaseControl
212+ label = { < Tooltip placement = "top" text = { < a href = "https://docs.wpstackable.com/article/343-using-the-design-library#Background-Scheme-Wn_CV" target = "_docs" >
213+ { __ ( 'Learn more about background schemes here.' , i18n ) }
214+ </ a > } >
215+ < span className = "stk-control__label--has-tooltip" > { __ ( 'Background Scheme' , i18n ) } </ span >
216+ </ Tooltip > }
207217 className = "ugb-modal-design-library__color-scheme-label"
208218 >
209219 < Dropdown
@@ -226,7 +236,6 @@ export const ModalDesignLibrary = props => {
226236 ? < ColorSchemePreview isCollapsed = { true } colors = { colorSchemesCollection [ selectedBackgroundScheme || backgroundModeColorScheme ] . desktopColors } />
227237 : < ColorSchemeTextItem label = { __ ( 'Default' , i18n ) } />
228238 }
229-
230239 </ Button >
231240 ) }
232241 renderContent = { ( { onClose } ) => (
@@ -264,27 +273,22 @@ export const ModalDesignLibrary = props => {
264273 </ Button >
265274 } ) }
266275 { Object . keys ( colorSchemesCollection ) . length
267- ? < ColorSchemesHelp renderComponent = { onClick => (
268- < Button
269- className = "ugb-modal-design-library__stk-color-scheme"
270- onClick = { ( ) => {
271- props . onClose ( )
272- onClick ( )
273- } }
274- >
275- < span className = "stk-color-scheme-name stk-color-scheme__none" > { __ ( 'Add Color Scheme' , i18n ) } </ span >
276- </ Button >
277- ) } />
276+ ? < ColorSchemesHelp customText = "" callback = { props . onClose } className = "ugb-design-library__manage-scheme" />
278277 : < ColorSchemesHelp customText = { __ ( 'You do not have any color schemes.' , i18n ) } callback = { props . onClose } />
279278 }
280279 </ div >
281280 </ div >
282281 ) }
283282 />
284283 </ BaseControl >
285- < BaseControl label = { `${ __ ( 'Container Scheme' , i18n ) } ` }
286-
287- className = "ugb-modal-design-library__color-scheme-label" >
284+ < BaseControl
285+ label = { < Tooltip placement = "top" text = { < a href = "https://docs.wpstackable.com/article/343-using-the-design-library#Container-Scheme-HyK91" target = "_docs" >
286+ { __ ( 'Learn more about container schemes here.' , i18n ) }
287+ </ a > } >
288+ < span className = "stk-control__label--has-tooltip" > { __ ( 'Container Scheme' , i18n ) } </ span >
289+ </ Tooltip > }
290+ className = "ugb-modal-design-library__color-scheme-label"
291+ >
288292 < Dropdown
289293 popoverProps = { popoverProps }
290294 focusOnMount = { false }
@@ -334,17 +338,7 @@ export const ModalDesignLibrary = props => {
334338 </ Button >
335339 } ) }
336340 { Object . keys ( colorSchemesCollection ) . length
337- ? < ColorSchemesHelp renderComponent = { onClick => (
338- < Button
339- className = "ugb-modal-design-library__stk-color-scheme"
340- onClick = { ( ) => {
341- props . onClose ( )
342- onClick ( )
343- } }
344- >
345- < span className = "stk-color-scheme-name stk-color-scheme__none" > { __ ( 'Add Color Scheme' , i18n ) } </ span >
346- </ Button >
347- ) } />
341+ ? < ColorSchemesHelp customText = "" callback = { props . onClose } className = "ugb-design-library__manage-scheme" />
348342 : < ColorSchemesHelp customText = { __ ( 'You do not have any color schemes.' , i18n ) } callback = { props . onClose } />
349343 }
350344 </ div >
0 commit comments