Skip to content

Commit 4753c7c

Browse files
authored
test
1 parent f5db144 commit 4753c7c

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

src/components/custom-procedures/custom-procedures.jsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,32 @@ const CustomProcedures = props => (
224224
/>
225225
</div>
226226
</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>
227253
<div
228254
className={styles.optionCard}
229255
role="button"
@@ -396,6 +422,7 @@ CustomProcedures.propTypes = {
396422
componentRef: PropTypes.func.isRequired,
397423
intl: intlShape,
398424
onAddBoolean: PropTypes.func.isRequired,
425+
onAddCommand: PropTypes.func.isRequired,
399426
onAddLabel: PropTypes.func.isRequired,
400427
onAddTextNumber: PropTypes.func.isRequired,
401428
onCancel: PropTypes.func.isRequired,

src/containers/custom-procedures.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ class CustomProcedures extends React.Component {
178178
this.mutationRoot.addBooleanExternal();
179179
}
180180
}
181+
handleAddCommand () {
182+
if (this.mutationRoot) {
183+
this.mutationRoot.addCommandExternal();
184+
}
185+
}
181186
handleAddTextNumber () {
182187
if (this.mutationRoot) {
183188
this.mutationRoot.addStringNumberExternal();
@@ -246,6 +251,7 @@ class CustomProcedures extends React.Component {
246251
blockColor={this.state.blockColor}
247252
returns={this.state.returns}
248253
onAddBoolean={this.handleAddBoolean}
254+
onAddCommand={this.handleAddCommand}
249255
onAddLabel={this.handleAddLabel}
250256
onAddTextNumber={this.handleAddTextNumber}
251257
onCancel={this.handleCancel}

0 commit comments

Comments
 (0)