Skip to content

Commit

Permalink
Merge pull request #29803 from storybookjs/norbert/sidebar-contextmen…
Browse files Browse the repository at this point in the history
…u-not-on-refs

Composition: Hide contextMenu on composed storybooks
  • Loading branch information
ndelangen authored Dec 4, 2024
2 parents c0fb407 + 8154eed commit 4489350
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/core/src/manager/components/sidebar/Tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ const Node = React.memo<NodeProps>(function Node({
]);

const id = createId(item.id, refId);
const contextMenu = useContextMenu(item, statusLinks, api);
const contextMenu =
refId === 'storybook_internal'
? useContextMenu(item, statusLinks, api)
: { node: null, onMouseEnter: () => {} };

if (item.type === 'story' || item.type === 'docs') {
const LeafNode = item.type === 'docs' ? DocumentNode : StoryNode;
Expand Down

0 comments on commit 4489350

Please sign in to comment.