diff --git a/src/components/TextForm.js b/src/components/TextForm.js index 07549d6..64df2b0 100644 --- a/src/components/TextForm.js +++ b/src/components/TextForm.js @@ -19,7 +19,13 @@ export default function TextForm(props) { setText(newText); props.showAlert("Text Cleared!", "success"); } - + const Encrypt=()=> { + var str = text; + var enc = window.btoa(text); + var res = "Encoded String: " + enc; + setText(res); + props.showAlert("String is Encrypetd!", "success"); +} const handleOnChange = (event)=>{ setText(event.target.value) } @@ -52,6 +58,8 @@ export default function TextForm(props) { + +

Your text summary