Change new prop isVariable to showListMessage to reflect the functionality of the prop
This commit is contained in:
1 parent
874c2b04bd
commit
87ea37f20b
3 files changed
+7
-7
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user