diff --git a/src/components/TextForm.js b/src/components/TextForm.js index 500e932..51a3b9e 100644 --- a/src/components/TextForm.js +++ b/src/components/TextForm.js @@ -32,6 +32,10 @@ export default function TextForm(props) { setText(newText); props.showAlert("Changed to Titlecase","success"); } + const handleRemove=()=>{ + let newText=text.split(/[ ]+/) + setText(newText.join(" ")); + } const handleClearClick= ()=> { @@ -118,6 +122,7 @@ export default function TextForm(props) { +