File tree Expand file tree Collapse file tree 6 files changed +94
-73
lines changed
organisms/EditInstrumentsModal
Designer/ProtocolSteps/StepForm/StepTools Expand file tree Collapse file tree 6 files changed +94
-73
lines changed Original file line number Diff line number Diff line change 9
9
DIRECTION_COLUMN ,
10
10
DIRECTION_ROW ,
11
11
EmptySelectorButton ,
12
+ FLEX_MAX_CONTENT ,
12
13
Flex ,
13
14
Icon ,
14
15
JUSTIFY_SPACE_BETWEEN ,
@@ -179,15 +180,17 @@ export function PipetteOverview({
179
180
) : null }
180
181
{ has96Channel ||
181
182
( leftPipette != null && rightPipette != null ) ? null : (
182
- < EmptySelectorButton
183
- onClick = { ( ) => {
184
- setPage ( 'add' )
185
- setMount ( targetPipetteMount )
186
- } }
187
- text = { t ( 'add_pipette' ) }
188
- textAlignment = "left"
189
- iconName = "plus"
190
- />
183
+ < Flex width = { FLEX_MAX_CONTENT } >
184
+ < EmptySelectorButton
185
+ onClick = { ( ) => {
186
+ setPage ( 'add' )
187
+ setMount ( targetPipetteMount )
188
+ } }
189
+ text = { t ( 'add_pipette' ) }
190
+ textAlignment = "left"
191
+ iconName = "plus"
192
+ />
193
+ </ Flex >
191
194
) }
192
195
</ Flex >
193
196
</ Flex >
@@ -238,14 +241,16 @@ export function PipetteOverview({
238
241
</ Flex >
239
242
</ ListItem >
240
243
) : (
241
- < EmptySelectorButton
242
- onClick = { ( ) => {
243
- dispatch ( toggleIsGripperRequired ( ) )
244
- } }
245
- text = { t ( 'protocol_overview:add_gripper' ) }
246
- textAlignment = "left"
247
- iconName = "plus"
248
- />
244
+ < Flex width = { FLEX_MAX_CONTENT } >
245
+ < EmptySelectorButton
246
+ onClick = { ( ) => {
247
+ dispatch ( toggleIsGripperRequired ( ) )
248
+ } }
249
+ text = { t ( 'protocol_overview:add_gripper' ) }
250
+ textAlignment = "left"
251
+ iconName = "plus"
252
+ />
253
+ </ Flex >
249
254
) }
250
255
</ Flex >
251
256
</ Flex >
Original file line number Diff line number Diff line change 8
8
DIRECTION_COLUMN ,
9
9
EmptySelectorButton ,
10
10
Flex ,
11
+ FLEX_MAX_CONTENT ,
11
12
ListItem ,
12
13
SPACING ,
13
14
StyledText ,
@@ -99,23 +100,24 @@ export function SelectFixtures(props: WizardTileProps): JSX.Element | null {
99
100
)
100
101
101
102
return (
102
- < EmptySelectorButton
103
- disabled = { numSlotsAvailable === 0 }
104
- key = { equipment }
105
- textAlignment = { TYPOGRAPHY . textAlignLeft }
106
- iconName = "plus"
107
- text = { t ( `${ equipment } ` ) }
108
- onClick = { ( ) => {
109
- if ( numSlotsAvailable === 0 ) {
110
- makeSnackbar ( t ( 'slots_limit_reached' ) as string )
111
- } else {
112
- setValue ( 'additionalEquipment' , [
113
- ...additionalEquipment ,
114
- equipment ,
115
- ] )
116
- }
117
- } }
118
- />
103
+ < Flex width = { FLEX_MAX_CONTENT } key = { equipment } >
104
+ < EmptySelectorButton
105
+ disabled = { numSlotsAvailable === 0 }
106
+ textAlignment = { TYPOGRAPHY . textAlignLeft }
107
+ iconName = "plus"
108
+ text = { t ( `${ equipment } ` ) }
109
+ onClick = { ( ) => {
110
+ if ( numSlotsAvailable === 0 ) {
111
+ makeSnackbar ( t ( 'slots_limit_reached' ) as string )
112
+ } else {
113
+ setValue ( 'additionalEquipment' , [
114
+ ...additionalEquipment ,
115
+ equipment ,
116
+ ] )
117
+ }
118
+ } }
119
+ />
120
+ </ Flex >
119
121
)
120
122
} ) }
121
123
</ Flex >
Original file line number Diff line number Diff line change 5
5
COLORS ,
6
6
DIRECTION_COLUMN ,
7
7
EmptySelectorButton ,
8
+ FLEX_MAX_CONTENT ,
8
9
Flex ,
9
10
ListItem ,
10
11
SPACING ,
@@ -320,7 +321,7 @@ function AddModuleEmptySelectorButton(
320
321
321
322
return (
322
323
< >
323
- < Flex { ...targetProps } >
324
+ < Flex { ...targetProps } width = { FLEX_MAX_CONTENT } >
324
325
< EmptySelectorButton
325
326
disabled = { ! areSlotsAvailable || disableGripperRequired }
326
327
textAlignment = { TYPOGRAPHY . textAlignLeft }
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import {
21
21
DISPLAY_FLEX ,
22
22
DISPLAY_INLINE_BLOCK ,
23
23
EmptySelectorButton ,
24
+ FLEX_MAX_CONTENT ,
24
25
Flex ,
25
26
Icon ,
26
27
JUSTIFY_SPACE_BETWEEN ,
@@ -554,16 +555,18 @@ export function SelectPipettes(props: WizardTileProps): JSX.Element | null {
554
555
pipettesByMount . right . pipetteName != null &&
555
556
pipettesByMount . left . tiprackDefURI != null &&
556
557
pipettesByMount . right . tiprackDefURI != null ) ? null : (
557
- < EmptySelectorButton
558
- onClick = { ( ) => {
559
- setPage ( 'add' )
560
- setMount ( targetPipetteMount )
561
- resetFields ( )
562
- } }
563
- text = { t ( 'add_pipette' ) }
564
- textAlignment = "left"
565
- iconName = "plus"
566
- />
558
+ < Flex width = { FLEX_MAX_CONTENT } >
559
+ < EmptySelectorButton
560
+ onClick = { ( ) => {
561
+ setPage ( 'add' )
562
+ setMount ( targetPipetteMount )
563
+ resetFields ( )
564
+ } }
565
+ text = { t ( 'add_pipette' ) }
566
+ textAlignment = "left"
567
+ iconName = "plus"
568
+ />
569
+ </ Flex >
567
570
) }
568
571
</ >
569
572
</ Flex >
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
10
10
Divider ,
11
11
DropdownMenu ,
12
12
EmptySelectorButton ,
13
+ FLEX_MAX_CONTENT ,
13
14
Flex ,
14
15
Icon ,
15
16
InputField ,
@@ -237,12 +238,14 @@ function IntializationEditor(props: InitializationEditorProps): JSX.Element {
237
238
{ wavelengthItems }
238
239
</ Flex >
239
240
{ mode === 'multi' && wavelengths . length < MAX_WAVELENGTHS ? (
240
- < EmptySelectorButton
241
- onClick = { handleAddWavelength }
242
- text = { t ( 'step_edit_form.absorbanceReader.add_wavelength.label' ) }
243
- textAlignment = "left"
244
- disabled = { numWavelengths === MAX_WAVELENGTHS }
245
- />
241
+ < Flex width = { FLEX_MAX_CONTENT } >
242
+ < EmptySelectorButton
243
+ onClick = { handleAddWavelength }
244
+ text = { t ( 'step_edit_form.absorbanceReader.add_wavelength.label' ) }
245
+ textAlignment = "left"
246
+ disabled = { numWavelengths === MAX_WAVELENGTHS }
247
+ />
248
+ </ Flex >
246
249
) : null }
247
250
</ Flex >
248
251
{ mode === 'single' ? (
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next'
3
3
import {
4
4
DIRECTION_COLUMN ,
5
5
EmptySelectorButton ,
6
+ FLEX_MAX_CONTENT ,
6
7
Flex ,
7
8
InfoScreen ,
8
9
JUSTIFY_FLEX_END ,
@@ -98,28 +99,34 @@ export function ThermocyclerProfileModal(
98
99
maxHeight = "31.875rem"
99
100
>
100
101
< Flex justifyContent = { JUSTIFY_FLEX_END } gridGap = { SPACING . spacing4 } >
101
- < EmptySelectorButton
102
- text = { t ( 'form:step_edit_form.field.thermocyclerProfile.add_cycle' ) }
103
- onClick = { ( ) => {
104
- if ( canAddStepOrProfile ) {
105
- setShowCreateNewCycle ( true )
106
- }
107
- } }
108
- textAlignment = "left"
109
- iconName = "plus"
110
- disabled = { ! canAddStepOrProfile }
111
- />
112
- < EmptySelectorButton
113
- text = { t ( 'form:step_edit_form.field.thermocyclerProfile.add_step' ) }
114
- onClick = { ( ) => {
115
- if ( canAddStepOrProfile ) {
116
- setShowCreateNewStep ( true )
117
- }
118
- } }
119
- textAlignment = "left"
120
- iconName = "plus"
121
- disabled = { ! canAddStepOrProfile }
122
- />
102
+ < Flex width = { FLEX_MAX_CONTENT } >
103
+ < EmptySelectorButton
104
+ text = { t (
105
+ 'form:step_edit_form.field.thermocyclerProfile.add_cycle'
106
+ ) }
107
+ onClick = { ( ) => {
108
+ if ( canAddStepOrProfile ) {
109
+ setShowCreateNewCycle ( true )
110
+ }
111
+ } }
112
+ textAlignment = "left"
113
+ iconName = "plus"
114
+ disabled = { ! canAddStepOrProfile }
115
+ />
116
+ </ Flex >
117
+ < Flex width = { FLEX_MAX_CONTENT } >
118
+ < EmptySelectorButton
119
+ text = { t ( 'form:step_edit_form.field.thermocyclerProfile.add_step' ) }
120
+ onClick = { ( ) => {
121
+ if ( canAddStepOrProfile ) {
122
+ setShowCreateNewStep ( true )
123
+ }
124
+ } }
125
+ textAlignment = "left"
126
+ iconName = "plus"
127
+ disabled = { ! canAddStepOrProfile }
128
+ />
129
+ </ Flex >
123
130
</ Flex >
124
131
{ steps . length > 0 || showCreateNewStep || showCreateNewCycle ? (
125
132
< Flex
You can’t perform that action at this time.
0 commit comments