Skip to content

Commit 671ecd1

Browse files
committed
fix(showcase/shell-docs): make InlineDemo framework-aware via frameworkOverride
Override InlineDemo in DocsPageView's MDX component map to substitute defaultFramework for the hardcoded integration prop when a framework is selected. MDX files don't need to change — the override happens at the render layer, matching how Snippet already handles this.
1 parent 0057d6b commit 671ecd1

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

showcase/shell-docs/src/components/docs-page-view.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,18 @@ export async function DocsPageView({
227227
defaultCell={defaultCell}
228228
/>
229229
),
230+
InlineDemo: (props: Record<string, unknown>) => {
231+
const InlineDemoComp = docsComponents.InlineDemo;
232+
return (
233+
<InlineDemoComp
234+
{...(props as { integration?: string; demo?: string })}
235+
integration={
236+
defaultFramework ??
237+
(props.integration as string | undefined)
238+
}
239+
/>
240+
);
241+
},
230242
}}
231243
options={{
232244
mdxOptions: {

0 commit comments

Comments
 (0)