diff --git a/src/components/prompt/prompt.css b/src/components/prompt/prompt.css index 5279012337b3f363715f017d8608346c3712e8fd..aa35f14901dc7e5b884d2bf624ca26e7c1155b20 100644 --- a/src/components/prompt/prompt.css +++ b/src/components/prompt/prompt.css @@ -58,6 +58,10 @@ margin: 0 0 1rem; } +.hide-more-options { + display: none; +} + .more-options-accordion { width: 60%; margin: 0 auto; diff --git a/src/components/prompt/prompt.jsx b/src/components/prompt/prompt.jsx index b99580b797206045b8e23949d3fe4e630fd7332f..ec20aeb61da9bee899f7c13d03996a198c844497 100644 --- a/src/components/prompt/prompt.jsx +++ b/src/components/prompt/prompt.jsx @@ -37,7 +37,7 @@ const PromptComponent = props => ( onKeyPress={props.onKeyPress} /> </Box> - <Box className={styles.moreOptions}> + <Box className={props.showMoreOptions ? styles.moreOptions : styles.hideMoreOptions}> <ComingSoonTooltip className={styles.moreOptionsAccordion} place="right" @@ -79,6 +79,7 @@ PromptComponent.propTypes = { onKeyPress: PropTypes.func.isRequired, onOk: PropTypes.func.isRequired, placeholder: PropTypes.string, + showMoreOptions: PropTypes.bool.isRequired, title: PropTypes.string.isRequired }; diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx index e546845e16fd80eac75d573bf5750626a08ea024..5be1498e157af2d933c95ca9eda04439855c059f 100644 --- a/src/containers/blocks.jsx +++ b/src/containers/blocks.jsx @@ -238,6 +238,7 @@ class Blocks extends React.Component { handlePromptStart (message, defaultValue, callback, optTitle) { const p = {prompt: {callback, message, defaultValue}}; p.prompt.title = optTitle ? optTitle : 'New Variable'; + p.prompt.showMoreOptions = optTitle !== 'New Message'; this.setState(p); } handlePromptCallback (data) { @@ -278,6 +279,7 @@ class Blocks extends React.Component { <Prompt label={this.state.prompt.message} placeholder={this.state.prompt.defaultValue} + showMoreOptions={this.state.prompt.showMoreOptions} title={this.state.prompt.title} onCancel={this.handlePromptClose} onOk={this.handlePromptCallback} diff --git a/src/containers/prompt.jsx b/src/containers/prompt.jsx index 78158fd0515502ebc292b56f0631f06ba5fcede9..a798b02ed780ea8a3dbe5a31bad4e17aa3b66226 100644 --- a/src/containers/prompt.jsx +++ b/src/containers/prompt.jsx @@ -33,6 +33,7 @@ class Prompt extends React.Component { <PromptComponent label={this.props.label} placeholder={this.props.placeholder} + showMoreOptions={this.props.showMoreOptions} title={this.props.title} onCancel={this.handleCancel} onChange={this.handleChange} @@ -48,6 +49,7 @@ Prompt.propTypes = { onCancel: PropTypes.func.isRequired, onOk: PropTypes.func.isRequired, placeholder: PropTypes.string, + showMoreOptions: PropTypes.bool.isRequired, title: PropTypes.string.isRequired };