renderClearButton () {
		if (this.state.removeExisting) {
			return (
				<Button type="link" onClick={this.undoRemove}>
					Undo Remove
				</Button>
			);
		} else {
			var clearText;
			if (this.hasLocal()) {
				clearText = 'Cancel';
			} else {
				clearText = (this.props.autoCleanup ? 'Delete Image' : 'Remove Image');
			}
			return (
				<Button type="link-cancel" onClick={this.removeImage}>
					{clearText}
				</Button>
			);
		}
	}
/**
	 * Output clear/delete/remove button.
	 *
	 *  - On removal of existing image, output "undo remove" button.
	 *  - Otherwise output Cancel/Delete image button.
	 */
Output clear/delete/remove button.
- On removal of existing image, output "undo remove" button.
- Otherwise output Cancel/Delete image button.
Output clear / delete / remove button . - On removal of existing image output " undo remove " button . - Otherwise output Cancel / Delete image button .
renderClearButton () {
		if (this.state.removeExisting) {
			return (
				<Button type="link" onClick={this.undoRemove}>
					Undo Remove
				</Button>
			);
		} else {
			var clearText;
			if (this.hasLocal()) {
				clearText = 'Cancel';
			} else {
				clearText = (this.props.autoCleanup ? 'Delete Image' : 'Remove Image');
			}
			return (
				<Button type="link-cancel" onClick={this.removeImage}>
					{clearText}
				</Button>
			);
		}
	}
renderClearButton ( ) { if ( this . state . removeExisting ) { return ( < Button type = "link" onClick = { this . undoRemove } > 
					Undo Remove
				 < / Button > ) ; } else { var clearText ; if ( this . hasLocal ( ) ) { clearText = 'Cancel' ; } else { clearText = ( this . props . autoCleanup ? 'Delete Image' : 'Remove Image' ) ; } return ( < Button type = "link-cancel" onClick = { this . removeImage } > { clearText } < / Button > ) ; } }
Output clear/delete/remove button.
Output clear / delete / remove button .