Skip to content

Commit

Permalink
Merge pull request #21773 from g-cappai/fix-double-border
Browse files Browse the repository at this point in the history
Addon Outline: Fix additional outline border in docs mode
  • Loading branch information
yannbf authored and shilman committed May 12, 2023
1 parent 83d1115 commit 45f40fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/addons/outline/src/withOutline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const withOutline = (StoryFn: StoryFunction<Renderer>, context: StoryCont
const isInDocs = context.viewMode === 'docs';

const outlineStyles = useMemo(() => {
const selector = isInDocs ? `#anchor--${context.id} .docs-story` : '.sb-show-main';
const selector = isInDocs ? `[data-story-block="true"]` : '.sb-show-main';

return outlineCSS(selector);
}, [context]);
Expand Down
2 changes: 1 addition & 1 deletion code/ui/blocks/src/components/Story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const Story: FunctionComponent<StoryProps> = (props) => {
const { inline } = props;

return (
<div id={storyBlockIdFromId(props)} className="sb-story sb-unstyled">
<div id={storyBlockIdFromId(props)} className="sb-story sb-unstyled" data-story-block="true">
{inline ? (
<InlineStory {...(props as InlineStoryProps)} />
) : (
Expand Down

0 comments on commit 45f40fb

Please sign in to comment.