diff --git a/package/src/components/AddressBook/v1/AddressBook.js b/package/src/components/AddressBook/v1/AddressBook.js index 263707e31..7da83606e 100644 --- a/package/src/components/AddressBook/v1/AddressBook.js +++ b/package/src/components/AddressBook/v1/AddressBook.js @@ -18,6 +18,10 @@ class AddressBook extends Component { */ addressBook: CustomPropTypes.addressBook }), + /** + * The text for the "Add a new address" text, if it is shown. + */ + addNewItemButtonText: PropTypes.string, /** * You can provide a `className` prop that will be applied to the outermost DOM element * rendered by this component. We do not recommend using this for styling purposes, but @@ -47,6 +51,14 @@ class AddressBook extends Component { */ AddressReview: CustomPropTypes.component.isRequired }).isRequired, + /** + * The text for the "Delete address" text, if it is shown. + */ + deleteItemButtonText: PropTypes.string, + /** + * The text for the "Save Changes" text, if it is shown. + */ + entryFormSubmitButtonText: PropTypes.string, /** * Is data being saved */ @@ -77,6 +89,9 @@ class AddressBook extends Component { account: { addressBook: [] }, + addNewItemButtonText: "Add a new address", + deleteItemButtonText: "Delete address", + entryFormSubmitButtonText: "Save Changes", isSaving: false, onAddressAdded() {}, onAddressDeleted() {}, @@ -133,7 +148,7 @@ class AddressBook extends Component { // Render Methods // renderAccordionFormList() { - const { account: { addressBook }, components: { AccordionFormList, AddressForm }, isSaving } = this.props; + const { account: { addressBook }, addNewItemButtonText, components: { AccordionFormList, AddressForm }, deleteItemButtonText, entryFormSubmitButtonText, isSaving } = this.props; const items = addressBook.map(({ _id, ...address }) => ({ id: _id, @@ -156,10 +171,10 @@ class AddressBook extends Component { return (