diff --git a/ui/src/shared/components/DeleteConfirmButtons.js b/ui/src/shared/components/DeleteConfirmButtons.js
index 3f503727d2..4a7aec5836 100644
--- a/ui/src/shared/components/DeleteConfirmButtons.js
+++ b/ui/src/shared/components/DeleteConfirmButtons.js
@@ -4,14 +4,14 @@ import classnames from 'classnames'
import OnClickOutside from 'shared/components/OnClickOutside'
import ConfirmButtons from 'shared/components/ConfirmButtons'
-const DeleteButton = ({onClickDelete, buttonSize}) =>
+const DeleteButton = ({onClickDelete, buttonSize, text}) =>
class DeleteConfirmButtons extends Component {
@@ -37,7 +37,7 @@ class DeleteConfirmButtons extends Component {
}
render() {
- const {onDelete, item, buttonSize} = this.props
+ const {onDelete, item, buttonSize, text} = this.props
const {isConfirming} = this.state
return isConfirming
@@ -48,6 +48,7 @@ class DeleteConfirmButtons extends Component {
buttonSize={buttonSize}
/>
:
@@ -57,11 +58,17 @@ class DeleteConfirmButtons extends Component {
const {func, oneOfType, shape, string} = PropTypes
DeleteButton.propTypes = {
+ text: string.isRequired,
onClickDelete: func.isRequired,
buttonSize: string,
}
+DeleteButton.defaultProps = {
+ text: 'Delete',
+}
+
DeleteConfirmButtons.propTypes = {
+ text: string,
item: oneOfType([(string, shape())]),
onDelete: func.isRequired,
buttonSize: string,