File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
components/custom-procedures Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,32 @@ const CustomProcedures = props => (
224
224
/>
225
225
</ div >
226
226
</ div >
227
+ < div
228
+ className = { styles . optionCard }
229
+ role = "button"
230
+ tabIndex = "0"
231
+ onClick = { props . onAddCommand }
232
+ display = "none" //shhh
233
+ >
234
+ < img
235
+ className = { styles . optionIcon }
236
+ src = { stackBlockIcon }
237
+ />
238
+ < div className = { styles . optionTitle } >
239
+ < FormattedMessage
240
+ defaultMessage = "Add an input"
241
+ description = "Label for button to add a command input"
242
+ id = "gui.customProcedures.addAnInputCommand"
243
+ />
244
+ </ div >
245
+ < div className = { styles . optionDescription } >
246
+ < FormattedMessage
247
+ defaultMessage = "command"
248
+ description = "Description of the command input type"
249
+ id = "gui.customProcedures.commandType"
250
+ />
251
+ </ div >
252
+ </ div >
227
253
< div
228
254
className = { styles . optionCard }
229
255
role = "button"
@@ -396,6 +422,7 @@ CustomProcedures.propTypes = {
396
422
componentRef : PropTypes . func . isRequired ,
397
423
intl : intlShape ,
398
424
onAddBoolean : PropTypes . func . isRequired ,
425
+ onAddCommand : PropTypes . func . isRequired ,
399
426
onAddLabel : PropTypes . func . isRequired ,
400
427
onAddTextNumber : PropTypes . func . isRequired ,
401
428
onCancel : PropTypes . func . isRequired ,
Original file line number Diff line number Diff line change @@ -178,6 +178,11 @@ class CustomProcedures extends React.Component {
178
178
this . mutationRoot . addBooleanExternal ( ) ;
179
179
}
180
180
}
181
+ handleAddCommand ( ) {
182
+ if ( this . mutationRoot ) {
183
+ this . mutationRoot . addCommandExternal ( ) ;
184
+ }
185
+ }
181
186
handleAddTextNumber ( ) {
182
187
if ( this . mutationRoot ) {
183
188
this . mutationRoot . addStringNumberExternal ( ) ;
@@ -246,6 +251,7 @@ class CustomProcedures extends React.Component {
246
251
blockColor = { this . state . blockColor }
247
252
returns = { this . state . returns }
248
253
onAddBoolean = { this . handleAddBoolean }
254
+ onAddCommand = { this . handleAddCommand }
249
255
onAddLabel = { this . handleAddLabel }
250
256
onAddTextNumber = { this . handleAddTextNumber }
251
257
onCancel = { this . handleCancel }
You can’t perform that action at this time.
0 commit comments