mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 21:51:48 +08:00
Addon-docs: Show code by default
This commit is contained in:
parent
1c4e048c5a
commit
f517a0a37d
@ -57,7 +57,9 @@ const getPreviewProps = (
|
|||||||
return {
|
return {
|
||||||
...props, // pass through columns etc.
|
...props, // pass through columns etc.
|
||||||
withSource: sourceProps,
|
withSource: sourceProps,
|
||||||
isExpanded: withSource === SourceState.OPEN,
|
isExpanded: withSource
|
||||||
|
? withSource === SourceState.OPEN
|
||||||
|
: docsContext?.parameters?.docs?.isExpanded,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,7 +29,12 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
parameters: { chromatic: { disable: true } },
|
parameters: {
|
||||||
|
docs: {
|
||||||
|
isExpanded: false,
|
||||||
|
},
|
||||||
|
chromatic: { disable: true },
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const DEFAULT_NESTED_OBJECT = { a: 4, b: { c: 'hello', d: [1, 2, 3] } };
|
const DEFAULT_NESTED_OBJECT = { a: 4, b: { c: 'hello', d: [1, 2, 3] } };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user