<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
93 lines
2.0 KiB
TypeScript
93 lines
2.0 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/react';
|
|
import {
|
|
TargetConfigurationGroupList,
|
|
TargetConfigurationGroupListProps,
|
|
} from './target-configuration-details-group-list';
|
|
|
|
const meta: Meta<typeof TargetConfigurationGroupList> = {
|
|
component: TargetConfigurationGroupList,
|
|
title: 'TargetConfigurationGroupList',
|
|
};
|
|
export default meta;
|
|
|
|
type Story = StoryObj<typeof TargetConfigurationGroupList>;
|
|
|
|
export const OneTarget: Story = {
|
|
args: {
|
|
project: {
|
|
name: 'react',
|
|
type: 'lib',
|
|
data: {
|
|
root: 'libs/react',
|
|
targets: {
|
|
build: {
|
|
executor: 'nx',
|
|
options: {},
|
|
configurations: {
|
|
production: {
|
|
executor: 'nx',
|
|
options: {},
|
|
},
|
|
},
|
|
},
|
|
lint: {
|
|
executor: 'nx',
|
|
options: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
sourceMap: {
|
|
react: ['react'],
|
|
},
|
|
variant: 'default',
|
|
onRunTarget: () => {},
|
|
onViewInTaskGraph: () => {},
|
|
selectedTargetGroup: 'build',
|
|
setExpandTargets: () => {},
|
|
collapseAllTargets: () => {},
|
|
} as TargetConfigurationGroupListProps,
|
|
};
|
|
|
|
export const TwoTargets: Story = {
|
|
args: {
|
|
project: {
|
|
name: 'react',
|
|
type: 'lib',
|
|
data: {
|
|
root: 'libs/react',
|
|
targets: {
|
|
build1: {
|
|
executor: 'nx',
|
|
options: {},
|
|
configurations: {
|
|
production: {
|
|
executor: 'nx',
|
|
options: {},
|
|
},
|
|
},
|
|
},
|
|
build2: {
|
|
executor: 'nx',
|
|
options: {},
|
|
},
|
|
},
|
|
metadata: {
|
|
targetGroups: {
|
|
build: ['build1', 'build2'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
sourceMap: {
|
|
react: ['react'],
|
|
},
|
|
variant: 'default',
|
|
onRunTarget: () => {},
|
|
onViewInTaskGraph: () => {},
|
|
selectedTargetGroup: 'build',
|
|
setExpandTargets: () => {},
|
|
collapseAllTargets: () => {},
|
|
} as TargetConfigurationGroupListProps,
|
|
};
|