fix(storybook): do not add Story args when the default value cannot be inferred (#7754)
This commit is contained in:
parent
55d68718d3
commit
97e154401b
@ -41,6 +41,9 @@ export class TestButtonComponent {
|
|||||||
@Input() style: ButtonStyle = 'default';
|
@Input() style: ButtonStyle = 'default';
|
||||||
@Input() age?: number;
|
@Input() age?: number;
|
||||||
@Input() isOn = false;
|
@Input() isOn = false;
|
||||||
|
@Input() message: string | undefined;
|
||||||
|
@Input() anotherProp: any;
|
||||||
|
@Input() anotherNeverProp: never;
|
||||||
}`
|
}`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -31,7 +31,7 @@ export function componentStoryGenerator(
|
|||||||
generateFiles(tree, templatesDir, destinationDir, {
|
generateFiles(tree, templatesDir, destinationDir, {
|
||||||
componentFileName: componentFileName,
|
componentFileName: componentFileName,
|
||||||
componentName: componentName,
|
componentName: componentName,
|
||||||
props,
|
props: props.filter((p) => typeof p.defaultValue !== 'undefined'),
|
||||||
tmpl: '',
|
tmpl: '',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user