@@ -9,6 +9,7 @@ import { FontSizePicker, TabPanel, Tooltip } from '@wordpress/components'
99import { __ } from '@wordpress/i18n'
1010import Colors from './colors'
1111import { NO_CUSTOM_VALUE , SELECTED_CLASS , ANIMATIONS , DEFAULT_SIZE } from './constants'
12+ import { deprecatedRenderIconV1 } from './deprecated/deprecatedSaveV1'
1213
1314const STYLES_TAB_NAME = 'styling'
1415const ANIMATIONS_TAB_NAME = 'animations'
@@ -379,7 +380,8 @@ export default function (params) {
379380 context,
380381 iconChooserOpenEvent,
381382 IconChooserModal,
382- handleSelect
383+ handleSelect,
384+ isInlineRichText = false
383385 } = params
384386
385387 const iconLayers = attributes . iconLayers || [ ]
@@ -460,6 +462,8 @@ export default function (params) {
460462 const { color, fontSize, backgroundColor } = context || { }
461463 const contextStyle = { color, fontSize, backgroundColor }
462464
465+ const renderIcon = isInlineRichText ? deprecatedRenderIconV1 : renderIconForEditor
466+
463467 return (
464468 < div className = "fawp-icon-modifier" >
465469 < div className = "fawp-icon-modifier-preview-container" >
@@ -468,7 +472,7 @@ export default function (params) {
468472 style = { contextStyle }
469473 onClick = { ( ) => document . dispatchEvent ( iconChooserOpenEvent ) }
470474 >
471- { renderIconForEditor ( attributes ) }
475+ { renderIcon ( attributes ) }
472476 </ div >
473477 </ div >
474478 < div className = { classnames ( 'fawp-icon-modifier-preview-controls' ) } >
0 commit comments