diff --git a/code/addons/outline/src/withOutline.ts b/code/addons/outline/src/withOutline.ts index f56545fc78b9..40196843b6c3 100644 --- a/code/addons/outline/src/withOutline.ts +++ b/code/addons/outline/src/withOutline.ts @@ -11,7 +11,7 @@ export const withOutline = (StoryFn: StoryFunction, 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]); diff --git a/code/ui/blocks/src/components/Story.tsx b/code/ui/blocks/src/components/Story.tsx index ff55bc9b05ca..2718197456f1 100644 --- a/code/ui/blocks/src/components/Story.tsx +++ b/code/ui/blocks/src/components/Story.tsx @@ -126,7 +126,7 @@ const Story: FunctionComponent = (props) => { const { inline } = props; return ( -
+
{inline ? ( ) : (