mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-03-19 15:01:06 +08:00
fix(bock-utils): Fix icon properties, size might be an issue.
This commit is contained in:
parent
da813c3d13
commit
cd2b9ad395
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user