Skip to content
Snippets Groups Projects
Unverified Commit d0f5b181 authored by Paul Kaplan's avatar Paul Kaplan Committed by GitHub
Browse files

Merge pull request #1311 from dgnball/remove_message

Remove "More options" in New Message dialog
parents ebb7db2f d3ae030f
No related branches found
No related tags found
No related merge requests found
...@@ -58,6 +58,10 @@ ...@@ -58,6 +58,10 @@
margin: 0 0 1rem; margin: 0 0 1rem;
} }
.hide-more-options {
display: none;
}
.more-options-accordion { .more-options-accordion {
width: 60%; width: 60%;
margin: 0 auto; margin: 0 auto;
......
...@@ -37,7 +37,7 @@ const PromptComponent = props => ( ...@@ -37,7 +37,7 @@ const PromptComponent = props => (
onKeyPress={props.onKeyPress} onKeyPress={props.onKeyPress}
/> />
</Box> </Box>
<Box className={styles.moreOptions}> <Box className={props.showMoreOptions ? styles.moreOptions : styles.hideMoreOptions}>
<ComingSoonTooltip <ComingSoonTooltip
className={styles.moreOptionsAccordion} className={styles.moreOptionsAccordion}
place="right" place="right"
...@@ -79,6 +79,7 @@ PromptComponent.propTypes = { ...@@ -79,6 +79,7 @@ PromptComponent.propTypes = {
onKeyPress: PropTypes.func.isRequired, onKeyPress: PropTypes.func.isRequired,
onOk: PropTypes.func.isRequired, onOk: PropTypes.func.isRequired,
placeholder: PropTypes.string, placeholder: PropTypes.string,
showMoreOptions: PropTypes.bool.isRequired,
title: PropTypes.string.isRequired title: PropTypes.string.isRequired
}; };
......
...@@ -238,6 +238,7 @@ class Blocks extends React.Component { ...@@ -238,6 +238,7 @@ class Blocks extends React.Component {
handlePromptStart (message, defaultValue, callback, optTitle) { handlePromptStart (message, defaultValue, callback, optTitle) {
const p = {prompt: {callback, message, defaultValue}}; const p = {prompt: {callback, message, defaultValue}};
p.prompt.title = optTitle ? optTitle : 'New Variable'; p.prompt.title = optTitle ? optTitle : 'New Variable';
p.prompt.showMoreOptions = optTitle !== 'New Message';
this.setState(p); this.setState(p);
} }
handlePromptCallback (data) { handlePromptCallback (data) {
...@@ -278,6 +279,7 @@ class Blocks extends React.Component { ...@@ -278,6 +279,7 @@ class Blocks extends React.Component {
<Prompt <Prompt
label={this.state.prompt.message} label={this.state.prompt.message}
placeholder={this.state.prompt.defaultValue} placeholder={this.state.prompt.defaultValue}
showMoreOptions={this.state.prompt.showMoreOptions}
title={this.state.prompt.title} title={this.state.prompt.title}
onCancel={this.handlePromptClose} onCancel={this.handlePromptClose}
onOk={this.handlePromptCallback} onOk={this.handlePromptCallback}
......
...@@ -33,6 +33,7 @@ class Prompt extends React.Component { ...@@ -33,6 +33,7 @@ class Prompt extends React.Component {
<PromptComponent <PromptComponent
label={this.props.label} label={this.props.label}
placeholder={this.props.placeholder} placeholder={this.props.placeholder}
showMoreOptions={this.props.showMoreOptions}
title={this.props.title} title={this.props.title}
onCancel={this.handleCancel} onCancel={this.handleCancel}
onChange={this.handleChange} onChange={this.handleChange}
...@@ -48,6 +49,7 @@ Prompt.propTypes = { ...@@ -48,6 +49,7 @@ Prompt.propTypes = {
onCancel: PropTypes.func.isRequired, onCancel: PropTypes.func.isRequired,
onOk: PropTypes.func.isRequired, onOk: PropTypes.func.isRequired,
placeholder: PropTypes.string, placeholder: PropTypes.string,
showMoreOptions: PropTypes.bool.isRequired,
title: PropTypes.string.isRequired title: PropTypes.string.isRequired
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment