fix(block-utils): Icon should not spin on page loading.

This commit is contained in:
Gervwyk 2022-04-26 13:42:43 +02:00
parent c6b8c69bb0
commit c3d9be52b1

View File

@ -44,10 +44,10 @@ const createIcon = (Icons) => {
const AiOutlineLoading3Quarters = Icons['AiOutlineLoading3Quarters'];
const AiOutlineExclamationCircle = Icons['AiOutlineExclamationCircle'];
const IconBlock = ({ blockId, events, loading, methods, onClick, properties, ...props }) => {
const IconBlock = ({ blockId, events, methods, onClick, properties, ...props }) => {
const propertiesObj = type.isString(properties) ? { name: properties } : properties;
const spin =
(propertiesObj.spin || loading || (events.onClick && events.onClick.loading)) &&
(propertiesObj.spin || (events.onClick && events.onClick.loading)) &&
!propertiesObj.disableLoadingIcon;
const iconProps = {
id: blockId,