diff --git a/packages/replacement-variable-editor/src/SettingsSnippetEditor.js b/packages/replacement-variable-editor/src/SettingsSnippetEditor.js index 62b0338fc8..1392da788d 100644 --- a/packages/replacement-variable-editor/src/SettingsSnippetEditor.js +++ b/packages/replacement-variable-editor/src/SettingsSnippetEditor.js @@ -122,6 +122,7 @@ class SettingsSnippetEditor extends React.Component { descriptionEditorFieldPlaceholder, hasPaperStyle, fieldIds, + labels, } = this.props; const { activeField, hoveredField } = this.state; @@ -140,6 +141,7 @@ class SettingsSnippetEditor extends React.Component { recommendedReplacementVariables={ recommendedReplacementVariables } containerPadding={ hasPaperStyle ? "0 20px" : "0" } fieldIds={ fieldIds } + labels={ labels } /> ); @@ -160,13 +162,18 @@ SettingsSnippetEditor.propTypes = { title: PropTypes.string.isRequired, description: PropTypes.string.isRequired, } ).isRequired, + labels: PropTypes.shape( { + title: PropTypes.string, + description: PropTypes.string, + } ), }; SettingsSnippetEditor.defaultProps = { replacementVariables: [], recommendedReplacementVariables: [], hasPaperStyle: true, - descriptionEditorFieldPlaceholder: "", + descriptionEditorFieldPlaceholder: null, + labels: {}, }; export default SettingsSnippetEditor; diff --git a/packages/replacement-variable-editor/src/SettingsSnippetEditorFields.js b/packages/replacement-variable-editor/src/SettingsSnippetEditorFields.js index be2d8e4878..0656149cee 100644 --- a/packages/replacement-variable-editor/src/SettingsSnippetEditorFields.js +++ b/packages/replacement-variable-editor/src/SettingsSnippetEditorFields.js @@ -124,6 +124,7 @@ class SettingsSnippetEditorFields extends React.Component { }, containerPadding, fieldIds, + labels, } = this.props; return ( @@ -132,7 +133,7 @@ class SettingsSnippetEditorFields extends React.Component { > onFocus( "title" ) } onBlur={ onBlur } isActive={ activeField === "title" } @@ -147,7 +148,7 @@ class SettingsSnippetEditorFields extends React.Component { onFocus( "description" ) } onBlur={ onBlur } isActive={ activeField === "description" } @@ -182,6 +183,10 @@ SettingsSnippetEditorFields.propTypes = { title: PropTypes.string.isRequired, description: PropTypes.string.isRequired, } ).isRequired, + labels: PropTypes.shape( { + title: PropTypes.string, + description: PropTypes.string, + } ), }; SettingsSnippetEditorFields.defaultProps = { @@ -189,6 +194,8 @@ SettingsSnippetEditorFields.defaultProps = { onFocus: () => {}, onBlur: () => {}, containerPadding: "0 20px", + descriptionEditorFieldPlaceholder: null, + labels: {}, }; export default SettingsSnippetEditorFields;