diff --git a/__mocks__/styleMock.js b/__mocks__/styleMock.js index 3fd7196880..2d77874313 100644 --- a/__mocks__/styleMock.js +++ b/__mocks__/styleMock.js @@ -58,4 +58,13 @@ module.exports = { modalIcon: { fill: 'gray', }, + icon: { + fill: 'gray', + }, + iconRetry: { + fill: 'gray', + }, + iconUploading: { + fill: 'gray', + }, }; diff --git a/gutenberg b/gutenberg index 6cb4c4da14..0773762250 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 6cb4c4da146fc1ae64a2f72ecd27b9af8e7456f0 +Subproject commit 0773762250afaec366e58d4e9e19c52efa92519a diff --git a/src/block-management/block-picker.js b/src/block-management/block-picker.js index d13770dc08..032dd41456 100644 --- a/src/block-management/block-picker.js +++ b/src/block-management/block-picker.js @@ -14,7 +14,7 @@ import { FlatList, Text, TouchableHighlight, View } from 'react-native'; */ import { SVG, Dashicon } from '@wordpress/components'; import { BottomSheet } from '@wordpress/block-editor'; -import { Component } from '@wordpress/element'; +import { Component, createElement } from '@wordpress/element'; import { getBlockTypes, getUnregisteredTypeHandlerName } from '@wordpress/blocks'; /** @@ -87,6 +87,11 @@ export default class BlockPicker extends Component { { icon.src.props.children } ); + } else if ( 'function' === typeof icon.src ) { + if ( icon.src.prototype instanceof Component ) { + return createElement( icon.src, { fill: color, size: styles.modalIcon.width } ); + } + return icon.src( { fill: color, size: styles.modalIcon.width } ); } }