Skip to content

Commit 72b97c9

Browse files
Jeffrey Lauwersclaude
andcommitted
fix: vervang SourceType.DYNAMIC door Source zonder type prop
SourceType is niet geëxporteerd uit @storybook/blocks — Rollup kan het niet resolven. Source zonder type prop gebruikt AUTO-modus, die voor stories met args automatisch DYNAMIC wordt (live updates met Controls). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 957d193 commit 72b97c9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/storybook/src/components/CodeTabs.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState } from 'react';
2-
import { Source, SourceType } from '@storybook/blocks';
2+
import { Source } from '@storybook/blocks';
33
import './CodeTabs.css';
44

55
interface CodeTabsProps {
@@ -20,8 +20,8 @@ type Tab = 'react' | 'html';
2020
* - HTML/CSS tab: shows the equivalent vanilla HTML markup
2121
*
2222
* Syntax highlighting via Storybook's built-in Source block from @storybook/blocks.
23-
* The React tab uses SourceType.DYNAMIC so it automatically shows the current story's
24-
* rendered code and updates live when Controls change.
23+
* The React tab uses Source without explicit type (defaults to AUTO, which resolves to
24+
* DYNAMIC for stories with args). This shows live story code and updates with Controls.
2525
* The tab bar uses design token CSS variables so it responds to dark mode.
2626
*/
2727
export function CodeTabs({ html }: CodeTabsProps) {
@@ -81,7 +81,7 @@ export function CodeTabs({ html }: CodeTabsProps) {
8181
</div>
8282
<div style={codeWrapperStyle}>
8383
{activeTab === 'react' ? (
84-
<Source type={SourceType.DYNAMIC} dark />
84+
<Source dark />
8585
) : (
8686
<Source code={html} language="html" dark />
8787
)}

0 commit comments

Comments
 (0)