Change new prop isVariable to showListMessage to reflect the functionality of the prop

This commit is contained in:
Karishma Chadha authored and GitHub committed 2021-12-22 14:28:31 -05:00
1 parent 874c2b04bd
commit 87ea37f20b
3 files changed
+7 -7

No files matched your search

+4 -4
View File
@@ -64,13 +64,13 @@ const PromptComponent = props => (
<div>
{props.isStage ?
<div className={styles.infoMessage}>
{props.isVariable ? (
{props.showListMessage ? (
<FormattedMessage
{...messages.availableToAllSpritesMessage}
{...messages.listAvailableToAllSpritesMessage}
/>
) : (
<FormattedMessage
{...messages.listAvailableToAllSpritesMessage}
{...messages.availableToAllSpritesMessage}
/>
)}
</div> :
@@ -153,7 +153,7 @@ PromptComponent.propTypes = {
defaultValue: PropTypes.string,
globalSelected: PropTypes.bool.isRequired,
isStage: PropTypes.bool.isRequired,
isVariable: PropTypes.bool.isRequired,
showListMessage: PropTypes.bool.isRequired,
label: PropTypes.string.isRequired,
onCancel: PropTypes.func.isRequired,
onChange: PropTypes.func.isRequired,
+1 -1
View File
@@ -544,7 +544,7 @@ class Blocks extends React.Component {
<Prompt
defaultValue={this.state.prompt.defaultValue}
isStage={vm.runtime.getEditingTarget().isStage}
isVariable={this.state.prompt.varType === VMScratchBlocks.SCALAR_VARIABLE_TYPE}
showListMessage={this.state.prompt.varType === VMScratchBlocks.LIST_VARIABLE_TYPE}
label={this.state.prompt.message}
showCloudOption={this.state.prompt.showCloudOption}
showVariableOptions={this.state.prompt.showVariableOptions}
+2 -2
View File
@@ -60,7 +60,7 @@ class Prompt extends React.Component {
defaultValue={this.props.defaultValue}
globalSelected={this.state.globalSelected}
isStage={this.props.isStage}
isVariable={this.props.isVariable}
showListMessage={this.props.showListMessage}
label={this.props.label}
showCloudOption={this.props.showCloudOption}
showVariableOptions={this.props.showVariableOptions}
@@ -80,7 +80,7 @@ class Prompt extends React.Component {
Prompt.propTypes = {
defaultValue: PropTypes.string,
isStage: PropTypes.bool.isRequired,
isVariable: PropTypes.bool.isRequired,
showListMessage: PropTypes.bool.isRequired,
label: PropTypes.string.isRequired,
onCancel: PropTypes.func.isRequired,
onOk: PropTypes.func.isRequired,