-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathManchette.stories.ts
44 lines (39 loc) · 1.09 KB
/
Manchette.stories.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import type { Meta, StoryObj } from '@storybook/react';
import '@osrd-project/ui-core/dist/theme.css';
import '@osrd-project/ui-manchette/dist/theme.css';
import { SAMPLE_PATH_PROPERTIES_DATA, SAMPLE_PATHS_DATA } from './assets/sampleData';
import Manchette from '../components/Manchette';
const OperationalPointListData = SAMPLE_PATH_PROPERTIES_DATA.operational_points ?? [];
const PathData = SAMPLE_PATHS_DATA ?? [];
const meta: Meta<typeof Manchette> = {
component: Manchette,
title: 'Manchette/Manchette',
tags: ['autodocs'],
argTypes: {
operationalPoints: {
control: {
type: 'object',
},
},
projectPathTrainResult: {
control: {
type: 'object',
},
},
selectedProjection: {
options: [undefined, ...SAMPLE_PATHS_DATA.map((path) => path.id)],
control: {
type: 'select',
},
},
},
};
export default meta;
type Story = StoryObj<typeof Manchette>;
export const Default: Story = {
args: {
operationalPoints: OperationalPointListData,
projectPathTrainResult: PathData,
selectedProjection: 3,
},
};