diff --git a/web/src/beta/lib/core/StoryPanel/ActionPanel/index.tsx b/web/src/beta/lib/core/StoryPanel/ActionPanel/index.tsx index aeee764df..1701448f1 100644 --- a/web/src/beta/lib/core/StoryPanel/ActionPanel/index.tsx +++ b/web/src/beta/lib/core/StoryPanel/ActionPanel/index.tsx @@ -50,7 +50,6 @@ const ActionPanel: React.FC = ({ }) => { const t = useT(); const ref = useItemContext(); - const handleRemove = useCallback(() => { onRemove?.(); onSettingsToggle?.(); @@ -75,7 +74,6 @@ const ActionPanel: React.FC = ({ } return menuItems; }, [settingsTitle, t, setShowPadding, onRemove, handleRemove]); - // console.log("PS", panelSettings); return ( @@ -120,12 +118,12 @@ const ActionPanel: React.FC = ({ {propertyId && panelSettings && ( - {Object.keys(panelSettings).map(fieldId => { + {Object.keys(panelSettings).map((fieldId, index) => { const field = panelSettings[fieldId]; const groupId = "panel"; return ( page?.property, [page?.property]); const propertyId = useMemo(() => page?.propertyId, [page?.propertyId]); - const panelSettings = useMemo( () => ({ padding: { @@ -55,10 +54,10 @@ export default ({ ), }, gap: { + ...property?.panel?.gap, value: - property?.panel?.gap?.value ?? isEditable - ? MIN_STORY_PAGE_GAP_IN_EDITOR - : DEFAULT_STORY_PAGE_GAP, + property?.panel?.gap?.value ?? + (isEditable ? MIN_STORY_PAGE_GAP_IN_EDITOR : DEFAULT_STORY_PAGE_GAP), }, }), [property?.panel, isEditable],