mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
Merge branch 'deprecate/remaining-lib-cli' into norbert/sb-799-create-a-storybooktypes
This commit is contained in:
commit
13e89f617e
@ -1,6 +1,8 @@
|
||||
import path from 'path';
|
||||
import initStoryshots, { multiSnapshotWithOptions, Stories2SnapsConverter } from '../src';
|
||||
|
||||
/* deprecated and will be removed in Storybook 8.0 */
|
||||
|
||||
class AnotherStories2SnapsConverter extends Stories2SnapsConverter {
|
||||
getSnapshotFileName(context) {
|
||||
const { fileName, kind, name } = context;
|
||||
@ -36,9 +38,13 @@ initStoryshots({
|
||||
integrityOptions: { cwd: __dirname },
|
||||
stories2snapsConverter: new AnotherStories2SnapsConverter({ snapshotExtension: '.boo' }),
|
||||
config: ({ configure }) =>
|
||||
configure(() => {
|
||||
// eslint-disable-next-line global-require
|
||||
require('./exported_metadata/Extra.stories.jsx');
|
||||
}, module),
|
||||
configure(
|
||||
() => {
|
||||
// eslint-disable-next-line global-require
|
||||
require('./exported_metadata/Extra.stories.jsx');
|
||||
},
|
||||
module,
|
||||
false
|
||||
),
|
||||
test: multiSnapshotWithOptions(),
|
||||
});
|
||||
|
@ -19,7 +19,8 @@ const rawOptionsHelper = (options, type, isMulti, initial) => {
|
||||
<>
|
||||
<OptionsControl
|
||||
name="options"
|
||||
options={options}
|
||||
labels={{}}
|
||||
argType={{ options }}
|
||||
value={value}
|
||||
type={type}
|
||||
onChange={(newVal) => setValue(newVal)}
|
||||
|
@ -40,7 +40,7 @@ export const OptionsControl: FC<OptionsProps> = (props) => {
|
||||
const { type = 'select', labels, argType } = props;
|
||||
const normalized = {
|
||||
...props,
|
||||
options: normalizeOptions(argType.options, labels),
|
||||
options: argType ? normalizeOptions(argType.options, labels) : {},
|
||||
isInline: type.includes('inline'),
|
||||
isMulti: type.includes('multi'),
|
||||
};
|
||||
|
@ -52,7 +52,6 @@ export type OptionsControlType =
|
||||
|
||||
export interface OptionsConfig {
|
||||
labels: Record<any, string>;
|
||||
options: Options;
|
||||
type: OptionsControlType;
|
||||
}
|
||||
|
||||
|
@ -10,9 +10,13 @@ import './rn-addons';
|
||||
addDecorator(withKnobs);
|
||||
|
||||
// import stories
|
||||
configure(() => {
|
||||
require('./stories');
|
||||
}, module);
|
||||
configure(
|
||||
() => {
|
||||
require('./stories');
|
||||
},
|
||||
module,
|
||||
false
|
||||
);
|
||||
|
||||
// Refer to https://github.com/storybookjs/react-native/tree/master/app/react-native#getstorybookui-options
|
||||
// To find allowed options for getStorybookUI
|
||||
|
Loading…
x
Reference in New Issue
Block a user