fix(bock-utils): Fix icon properties, size might be an issue.

This commit is contained in:
Gervwyk 2022-01-21 18:26:24 +02:00
parent da813c3d13
commit cd2b9ad395

View File

@ -59,7 +59,7 @@ const createIcon = (Icons) => {
const AiOutlineLoading3Quarters = Icons['AiOutlineLoading3Quarters'];
const AiOutlineExclamationCircle = Icons['AiOutlineExclamationCircle'];
const IconComp = ({ blockId, events, methods, properties, ...props }) => {
const IconBlock = ({ blockId, events, methods, properties, ...props }) => {
const propertiesObj = type.isString(properties) ? { name: properties } : properties;
const iconProps = {
id: blockId,
@ -68,6 +68,9 @@ const createIcon = (Icons) => {
[spinClass]: propertiesObj.spin,
}),
rotate: propertiesObj.rotate,
color: propertiesObj.color,
title: propertiesObj.name,
size: propertiesObj.size,
// twoToneColor: propertiesObj.color, // TODO: track https://github.com/react-icons/react-icons/issues/508
...omit(props, lowdefyProps),
};
@ -101,8 +104,8 @@ const createIcon = (Icons) => {
</>
);
};
IconComp.defaultProps = blockDefaultProps;
return IconComp;
IconBlock.defaultProps = blockDefaultProps;
return IconBlock;
};
export default createIcon;