Skip to content

Commit

Permalink
feat(angular): support context.component
Browse files Browse the repository at this point in the history
  • Loading branch information
philippone committed Mar 4, 2022
1 parent e0dd3be commit c1a4642
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/angular/angular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ export const withPseudo = makeDecorator({
) => {
const story = getStory(context);
const channel = addons.getChannel();
const compInternal = (story.component || context.parameters.component)
?.__annotations__[0];
const compInternal = (
story?.component ??
context?.component ??
context?.parameters?.component
)?.__annotations__[0];

// are options set by user
const options: OptionsParameter = settings?.options;
Expand Down

0 comments on commit c1a4642

Please sign in to comment.