From 0c16b458c7a356ed5f9f0e6c1a37014e0c374767 Mon Sep 17 00:00:00 2001 From: Beatrice Mkumbo Date: Wed, 8 Nov 2023 00:10:14 +0300 Subject: [PATCH] chore(web): storyblock ux update (#776) --- .../Block/builtin/common/Wrapper.tsx | 9 ++++--- .../StoryPanel/Block/builtin/common/hooks.ts | 24 +++++++++++-------- .../core/StoryPanel/SelectableArea/index.tsx | 2 +- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/web/src/beta/lib/core/StoryPanel/Block/builtin/common/Wrapper.tsx b/web/src/beta/lib/core/StoryPanel/Block/builtin/common/Wrapper.tsx index e1c2bd00ee..8179effe98 100644 --- a/web/src/beta/lib/core/StoryPanel/Block/builtin/common/Wrapper.tsx +++ b/web/src/beta/lib/core/StoryPanel/Block/builtin/common/Wrapper.tsx @@ -29,7 +29,6 @@ type Props = { dndEnabled?: boolean; settingsEnabled?: boolean; onClick?: () => void; - onClickAway?: () => void; onRemove?: () => void; }; @@ -44,7 +43,6 @@ const BlockWrapper: React.FC = ({ dndEnabled = true, settingsEnabled = true, onClick, - onClickAway, onRemove, }) => { const { @@ -81,12 +79,13 @@ const BlockWrapper: React.FC = ({ setEditMode={setEditMode} onEditModeToggle={handleEditModeToggle} onSettingsToggle={handleSettingsToggle} - onRemove={onRemove} - onClickAway={onClickAway}> + onRemove={onRemove}> + onClick={e => { + handleBlockClick(e); + }}> {children ?? (isEditable &&