Browse Source

[CL-298] feat: add context story

CL-298-async-actions-2-0-context-string
Andreas Coroiu 2 years ago
parent
commit
7a6d78d414
No known key found for this signature in database
GPG Key ID: E70B5FFC81DFEC1A
  1. 13
      libs/components/src/async-actions/standalone.stories.ts

13
libs/components/src/async-actions/standalone.stories.ts

@ -101,3 +101,16 @@ export const RejectedPromise: ObservableStory = { @@ -101,3 +101,16 @@ export const RejectedPromise: ObservableStory = {
template: `<app-rejected-promise-example></app-rejected-promise-example>`,
}),
};
export const WithContext: ObservableStory = {
render: (args) => ({
template: `
<button bitButton buttonType="primary" class="tw-mr-2" [bitAction]="action" context="example">
Perform action
</button>
<button bitIconButton="bwi-trash" buttonType="danger" [bitAction]="action" context="example"></button>`,
props: {
action: () => new Promise((resolve) => setTimeout(resolve, 2000)),
},
}),
};

Loading…
Cancel
Save