From 9e31a14fcb1b3245ba0ae2b39938a6701de1b352 Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Thu, 1 Feb 2024 17:29:18 +0530 Subject: [PATCH] Fix button text --- .../components/Button/NavCardButton/index.js | 20 ++++++++----------- src/OnboardingSPA/components/Button/index.js | 6 +++--- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/OnboardingSPA/components/Button/NavCardButton/index.js b/src/OnboardingSPA/components/Button/NavCardButton/index.js index 4571de218..406ac39d7 100644 --- a/src/OnboardingSPA/components/Button/NavCardButton/index.js +++ b/src/OnboardingSPA/components/Button/NavCardButton/index.js @@ -53,20 +53,16 @@ const NavCardButton = ( { text, disabled, className, icon } ) => { return ( ); }; diff --git a/src/OnboardingSPA/components/Button/index.js b/src/OnboardingSPA/components/Button/index.js index 52d5502d7..6c6d15021 100644 --- a/src/OnboardingSPA/components/Button/index.js +++ b/src/OnboardingSPA/components/Button/index.js @@ -5,9 +5,9 @@ * @return Button */ -const Button = ( { text, handleClick, disabled, className } ) => { +const Button = ( { children, handleClick, disabled, className } ) => { const handleBtnClick = () => { - if ( handleClick ) { + if ( typeof handleClick === 'function' ) { handleClick(); } }; @@ -19,7 +19,7 @@ const Button = ( { text, handleClick, disabled, className } ) => { onClick={ handleBtnClick } disabled={ disabled } > - { text } + { children } ); };