diff --git a/libs/extension/src/components/ComponentInfo.tsx b/libs/extension/src/components/ComponentInfo.tsx
index 328642bd..b3b09d4a 100644
--- a/libs/extension/src/components/ComponentInfo.tsx
+++ b/libs/extension/src/components/ComponentInfo.tsx
@@ -70,9 +70,9 @@ function ComponentAttr({ attrsName, attrsType, attrs, id }: {
{hasChild && }
{`${item.name}`}
{' :'}
- {item.type === 'string' || item.type === 'number' ? (
- {
const nextAttrs = [...editableAttrs];
@@ -93,8 +93,23 @@ function ComponentAttr({ attrsName, attrsType, attrs, id }: {
}
}}
/>
- ) : (
- {item.value}
+ : (item.type === 'boolean'
+ ? {
+ const nextAttrs = [...editableAttrs];
+ const nextItem = {...item};
+ nextItem.value = event.target.checked;
+ nextAttrs[index] = nextItem;
+ setEditableAttrs(nextAttrs);
+ if (!isDev) {
+ const data = buildAttrModifyData(attrsType,attrs, nextItem.value,item, index, id);
+ postMessageToBackground(ModifyAttrs, data);
+ }
+ }}/>
+ : {item.value}
)}
);