Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon Outline: Fix additional outline border in docs mode #21773

Merged
merged 5 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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