Skip to content

Commit 3aabbe5

Browse files
authored
fix: apply multicolor to icon in editor and show custom icon color in frontend (#3666)
* always run setIcon when multicolor * show custom icon color in frontend
1 parent 5dc9138 commit 3aabbe5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/block-components/icon/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ export const Icon = props => {
211211
if ( processedIconRef.current === _icon && _icon ) {
212212
dispatch( 'stackable/page-icons' ).removePageIcon( _icon )
213213
processedIconRef.current = null
214-
setIcon( _icon ) // Use the original icon directly
215-
lastIconValueRef.current = _icon
216214
}
215+
setIcon( _icon ) // Use the original icon directly
216+
lastIconValueRef.current = _icon
217217
return
218218
}
219219

src/block/icon-list/save.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ export const Save = props => {
3939
blockAlignmentClass,
4040
responsiveClass,
4141
textClasses,
42-
] )
42+
], {
43+
'stk__use-custom-icon-color': attributes.useCustomIconColor,
44+
} )
4345
const tagNameClassNames = classnames( [
4446
attributes.ordered ? 'stk-block-icon-list__ol' : 'stk-block-icon-list__ul',
4547
attributes.listDisplayStyle && attributes.listDisplayStyle === 'grid' ? 'stk-block-icon-list--grid' : 'stk-block-icon-list--column',

0 commit comments

Comments
 (0)