1
1
import * as React from 'react'
2
- import { v4 as uuidv4 } from 'uuid'
3
2
4
3
import {
5
- STAGING_AREA_LOAD_NAME ,
6
- STANDARD_SLOT_LOAD_NAME ,
7
- TRASH_BIN_LOAD_NAME ,
8
- WASTE_CHUTE_LOAD_NAME ,
4
+ SINGLE_CENTER_SLOT_FIXTURE ,
5
+ SINGLE_LEFT_SLOT_FIXTURE ,
6
+ STAGING_AREA_RIGHT_SLOT_FIXTURE ,
7
+ TRASH_BIN_ADAPTER_FIXTURE ,
8
+ WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE ,
9
9
} from '@opentrons/shared-data'
10
10
11
11
import { DeckConfigurator } from '.'
12
12
13
13
import type { Story , Meta } from '@storybook/react'
14
- import type { Fixture } from '@opentrons/shared-data'
14
+ import type { CutoutConfig } from '@opentrons/shared-data'
15
15
16
16
export default {
17
17
title : 'Library/Molecules/Simulation/DeckConfigurator' ,
@@ -20,62 +20,68 @@ export default {
20
20
const Template : Story < React . ComponentProps < typeof DeckConfigurator > > = args => (
21
21
< DeckConfigurator { ...args } />
22
22
)
23
- const deckConfig : Fixture [ ] = [
23
+ const deckConfig : CutoutConfig [ ] = [
24
24
{
25
- fixtureLocation : 'cutoutA1' ,
26
- loadName : STANDARD_SLOT_LOAD_NAME ,
27
- fixtureId : uuidv4 ( ) ,
25
+ cutoutId : 'cutoutA1' ,
26
+ cutoutFixtureId : SINGLE_LEFT_SLOT_FIXTURE ,
28
27
} ,
29
28
{
30
- fixtureLocation : 'cutoutB1' ,
31
- loadName : STANDARD_SLOT_LOAD_NAME ,
32
- fixtureId : uuidv4 ( ) ,
29
+ cutoutId : 'cutoutB1' ,
30
+ cutoutFixtureId : SINGLE_LEFT_SLOT_FIXTURE ,
33
31
} ,
34
32
{
35
- fixtureLocation : 'cutoutC1' ,
36
- loadName : STANDARD_SLOT_LOAD_NAME ,
37
- fixtureId : uuidv4 ( ) ,
33
+ cutoutId : 'cutoutC1' ,
34
+ cutoutFixtureId : SINGLE_LEFT_SLOT_FIXTURE ,
38
35
} ,
39
36
{
40
- fixtureLocation : 'cutoutD1' ,
41
- loadName : STANDARD_SLOT_LOAD_NAME ,
42
- fixtureId : uuidv4 ( ) ,
37
+ cutoutId : 'cutoutD1' ,
38
+ cutoutFixtureId : SINGLE_LEFT_SLOT_FIXTURE ,
43
39
} ,
44
40
{
45
- fixtureLocation : 'cutoutA3' ,
46
- loadName : TRASH_BIN_LOAD_NAME ,
47
- fixtureId : uuidv4 ( ) ,
41
+ cutoutFixtureId : SINGLE_CENTER_SLOT_FIXTURE ,
42
+ cutoutId : 'cutoutA2' ,
48
43
} ,
49
44
{
50
- fixtureLocation : 'cutoutB3' ,
51
- loadName : STANDARD_SLOT_LOAD_NAME ,
52
- fixtureId : uuidv4 ( ) ,
45
+ cutoutFixtureId : SINGLE_CENTER_SLOT_FIXTURE ,
46
+ cutoutId : 'cutoutB2' ,
53
47
} ,
54
48
{
55
- fixtureLocation : 'cutoutC3' ,
56
- loadName : STAGING_AREA_LOAD_NAME ,
57
- fixtureId : uuidv4 ( ) ,
49
+ cutoutFixtureId : SINGLE_CENTER_SLOT_FIXTURE ,
50
+ cutoutId : 'cutoutC2' ,
58
51
} ,
59
52
{
60
- fixtureLocation : 'cutoutD3' ,
61
- loadName : WASTE_CHUTE_LOAD_NAME ,
62
- fixtureId : uuidv4 ( ) ,
53
+ cutoutFixtureId : SINGLE_CENTER_SLOT_FIXTURE ,
54
+ cutoutId : 'cutoutD2' ,
55
+ } ,
56
+ {
57
+ cutoutId : 'cutoutA3' ,
58
+ cutoutFixtureId : TRASH_BIN_ADAPTER_FIXTURE ,
59
+ } ,
60
+ {
61
+ cutoutId : 'cutoutB3' ,
62
+ cutoutFixtureId : STAGING_AREA_RIGHT_SLOT_FIXTURE ,
63
+ } ,
64
+ {
65
+ cutoutId : 'cutoutC3' ,
66
+ cutoutFixtureId : STAGING_AREA_RIGHT_SLOT_FIXTURE ,
67
+ } ,
68
+ {
69
+ cutoutId : 'cutoutD3' ,
70
+ cutoutFixtureId : WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE ,
63
71
} ,
64
72
]
65
73
66
74
export const Default = Template . bind ( { } )
67
75
Default . args = {
68
76
deckConfig,
69
- handleClickAdd : fixtureLocation => console . log ( `add at ${ fixtureLocation } ` ) ,
70
- handleClickRemove : fixtureLocation =>
71
- console . log ( `remove at ${ fixtureLocation } ` ) ,
77
+ handleClickAdd : cutoutId => console . log ( `add at ${ cutoutId } ` ) ,
78
+ handleClickRemove : cutoutId => console . log ( `remove at ${ cutoutId } ` ) ,
72
79
}
73
80
74
81
export const ReadOnly = Template . bind ( { } )
75
82
ReadOnly . args = {
76
83
deckConfig,
77
- handleClickAdd : fixtureLocation => console . log ( `add at ${ fixtureLocation } ` ) ,
78
- handleClickRemove : fixtureLocation =>
79
- console . log ( `remove at ${ fixtureLocation } ` ) ,
84
+ handleClickAdd : cutoutId => console . log ( `add at ${ cutoutId } ` ) ,
85
+ handleClickRemove : cutoutId => console . log ( `remove at ${ cutoutId } ` ) ,
80
86
readOnly : true ,
81
87
}
0 commit comments