Skip to content

Commit

Permalink
Merge pull request #2010 from GSA/1996-bug-fix-button-group
Browse files Browse the repository at this point in the history
PXBF-1996-bug-fix-button-group
  • Loading branch information
scottqueen-bixal authored Dec 18, 2024
2 parents 97b4794 + 1eac82e commit 435c61b
Showing 1 changed file with 10 additions and 27 deletions.
37 changes: 10 additions & 27 deletions benefit-finder/src/shared/components/Modal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,29 +137,6 @@ const Modal = ({
})
}, [modalOpen])

/**
* a functional component that renders a link as a button for launching our dialog
* @component
* @param {string} id - matches to modal control
* @param {string} triggerLabel - passed to button for triggering modal
* @return {html} returns an obfuscated anchor element
*/
const Trigger = ({ triggerLabel, onKeyDown, onClick }) => {
return (
<ObfuscatedLink
onClick={onClick}
onKeyDown={onKeyDown}
noCarrot
tabIndex="0"
triggerRef={triggerRef}
aria-label="Continue"
role="button"
>
{triggerLabel}
</ObfuscatedLink>
)
}

/**
* a functional component that renders a two links as a buttons for navigating out of the dialog
* @component
Expand Down Expand Up @@ -225,11 +202,17 @@ const Modal = ({

return (
<div id={id} className="bf-usa-modal-group">
<Trigger
triggerLabel={triggerLabel}
onKeyDown={e => handleKeyValidation(e) && handleOpenModal()}
<ObfuscatedLink
onClick={() => handleOpenModal()}
></Trigger>
onKeyDown={e => handleKeyValidation(e) && handleOpenModal()}
noCarrot
tabIndex="0"
triggerRef={triggerRef}
aria-label="Continue"
role="button"
>
{triggerLabel}
</ObfuscatedLink>
<NavModal
id="benefit-finder-modal"
isOpen={modalOpen}
Expand Down

0 comments on commit 435c61b

Please sign in to comment.