|
| 1 | +import React from 'react'; |
| 2 | + |
| 3 | +import { ComponentMeta, ComponentStory } from '@storybook/react'; |
| 4 | + |
| 5 | +import { VariantAnalysisContainer } from '../../view/variant-analysis/VariantAnalysisContainer'; |
| 6 | +import { VariantAnalysisStatus } from '../../remote-queries/shared/variant-analysis'; |
| 7 | +import { VariantAnalysisActions } from '../../view/variant-analysis/VariantAnalysisActions'; |
| 8 | + |
| 9 | +export default { |
| 10 | + title: 'Variant Analysis/Variant Analysis Actions', |
| 11 | + component: VariantAnalysisActions, |
| 12 | + decorators: [ |
| 13 | + (Story) => ( |
| 14 | + <VariantAnalysisContainer> |
| 15 | + <Story /> |
| 16 | + </VariantAnalysisContainer> |
| 17 | + ) |
| 18 | + ], |
| 19 | + argTypes: { |
| 20 | + onStopQueryClick: { |
| 21 | + action: 'stop-query-clicked', |
| 22 | + table: { |
| 23 | + disable: true, |
| 24 | + }, |
| 25 | + }, |
| 26 | + onCopyRepositoryListClick: { |
| 27 | + action: 'copy-repository-list-clicked', |
| 28 | + table: { |
| 29 | + disable: true, |
| 30 | + }, |
| 31 | + }, |
| 32 | + onExportResultsClick: { |
| 33 | + action: 'export-results-clicked', |
| 34 | + table: { |
| 35 | + disable: true, |
| 36 | + }, |
| 37 | + }, |
| 38 | + } |
| 39 | +} as ComponentMeta<typeof VariantAnalysisActions>; |
| 40 | + |
| 41 | +const Template: ComponentStory<typeof VariantAnalysisActions> = (args) => ( |
| 42 | + <VariantAnalysisActions {...args} /> |
| 43 | +); |
| 44 | + |
| 45 | +export const InProgress = Template.bind({}); |
| 46 | +InProgress.args = { |
| 47 | + variantAnalysisStatus: VariantAnalysisStatus.InProgress, |
| 48 | +}; |
| 49 | + |
| 50 | +export const Succeeded = Template.bind({}); |
| 51 | +Succeeded.args = { |
| 52 | + ...InProgress.args, |
| 53 | + variantAnalysisStatus: VariantAnalysisStatus.Succeeded, |
| 54 | +}; |
| 55 | + |
| 56 | +export const Failed = Template.bind({}); |
| 57 | +Failed.args = { |
| 58 | + ...InProgress.args, |
| 59 | + variantAnalysisStatus: VariantAnalysisStatus.Failed, |
| 60 | +}; |
0 commit comments