From 63a93a0c216fc152104a39be0253fd72ffa20aa3 Mon Sep 17 00:00:00 2001 From: "vinu.ganesan" Date: Thu, 21 Dec 2023 12:02:41 +0530 Subject: [PATCH] Prop name updated --- .../src/components/UConfirmationButtonExample.js | 12 ++++++------ .../UConfirmationButton/UConfirmationButton.js | 14 +++++++------- .../UConfirmationButton/UConfirmationButton.md | 12 ++++++------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/example/src/components/UConfirmationButtonExample.js b/example/src/components/UConfirmationButtonExample.js index cd8b82dc6..0bc95930b 100644 --- a/example/src/components/UConfirmationButtonExample.js +++ b/example/src/components/UConfirmationButtonExample.js @@ -40,7 +40,7 @@ export default function UConfirmationButtonExample() { - Confirmation popup variant + Confirm popup variant @@ -50,7 +50,7 @@ export default function UConfirmationButtonExample() { onConfirm={handleDelete} id={1} buttonText="Delete" - confirmationVariant="popup" + confirmVariant="popup" /> @@ -88,7 +88,7 @@ export default function UConfirmationButtonExample() { buttonText="Delete" variant="menuItem" icon={null} - confirmationVariant="popup" + confirmVariant="popup" /> @@ -100,7 +100,7 @@ export default function UConfirmationButtonExample() { confirmText="Are you sure you want to delete the item?" buttonText="Delete" variant="button" - confirmationVariant="popup" + confirmVariant="popup" /> @@ -112,13 +112,13 @@ export default function UConfirmationButtonExample() { variant="button" confirmText="Are you sure you want to unlink the item?" confirmActionText="Yes, unlink" - confirmationVariant="popup" + confirmVariant="popup" icon={} /> - Confirmation menu variant + Confirm menu variant diff --git a/src/components/UConfirmationButton/UConfirmationButton.js b/src/components/UConfirmationButton/UConfirmationButton.js index a02668e55..b2be22f57 100644 --- a/src/components/UConfirmationButton/UConfirmationButton.js +++ b/src/components/UConfirmationButton/UConfirmationButton.js @@ -56,14 +56,14 @@ export default function UConfirmationButton(props) { confirmActionText, cancelText, buttonVariant, - confirmationVariant, + confirmVariant, } = props const [deleteAnchorEl, setDeleteAnchorEl] = useState(null) const [openDialog, setOpenDialog] = useState(false) const handleConfirm = e => { onConfirm && onConfirm(e, id) - if (confirmationVariant === CONFIRMATION_VARIANTS.popup) { + if (confirmVariant === CONFIRMATION_VARIANTS.popup) { setOpenDialog(false) } else { handleDeleteOptionClicked(e) @@ -75,7 +75,7 @@ export default function UConfirmationButton(props) { } const handleClick = e => { - if (confirmationVariant === CONFIRMATION_VARIANTS.popup) { + if (confirmVariant === CONFIRMATION_VARIANTS.popup) { setOpenDialog(true) } else { setDeleteAnchorEl(e.currentTarget) @@ -118,7 +118,7 @@ export default function UConfirmationButton(props) { )} - {confirmationVariant === CONFIRMATION_VARIANTS.popup ? ( + {confirmVariant === CONFIRMATION_VARIANTS.popup ? ( {confirmText || ''} @@ -164,8 +164,8 @@ UConfirmationButton.propTypes = { CONTROL_VARIANTS.icon, CONTROL_VARIANTS.button, ]), - /** Confirmation variant: popup or menu */ - confirmationVariant: PropTypes.oneOf([ + /** Confirm variant: popup or menu */ + confirmVariant: PropTypes.oneOf([ CONFIRMATION_VARIANTS.popup, CONFIRMATION_VARIANTS.menu, ]), @@ -192,5 +192,5 @@ UConfirmationButton.defaultProps = { cancelText: 'No', icon: , buttonVariant: 'text', - confirmationVariant: 'menu', + confirmVariant: 'menu', } diff --git a/src/components/UConfirmationButton/UConfirmationButton.md b/src/components/UConfirmationButton/UConfirmationButton.md index 4c0e41f43..018a7a284 100644 --- a/src/components/UConfirmationButton/UConfirmationButton.md +++ b/src/components/UConfirmationButton/UConfirmationButton.md @@ -27,7 +27,7 @@ import MoreVertIcon from '@material-ui/icons/MoreVert' - Confirmation popup variant + Confirm popup variant @@ -37,7 +37,7 @@ import MoreVertIcon from '@material-ui/icons/MoreVert' onConfirm={handleDelete} id={1} buttonText="Delete" - confirmationVariant="popup" + confirmVariant="popup" /> @@ -75,7 +75,7 @@ import MoreVertIcon from '@material-ui/icons/MoreVert' buttonText="Delete" variant="menuItem" icon={null} - confirmationVariant="popup" + confirmVariant="popup" /> @@ -87,7 +87,7 @@ import MoreVertIcon from '@material-ui/icons/MoreVert' confirmText="Are you sure you want to delete the item?" buttonText="Delete" variant="button" - confirmationVariant="popup" + confirmVariant="popup" /> @@ -99,13 +99,13 @@ import MoreVertIcon from '@material-ui/icons/MoreVert' variant="button" confirmText="Are you sure you want to unlink the item?" confirmActionText="Yes, unlink" - confirmationVariant="popup" + confirmVariant="popup" icon={} /> - Confirmation menu variant + Confirm menu variant