Skip to content

Commit

Permalink
Merge pull request #663 from SUI-Components/feature/topbar-user-cta-l…
Browse files Browse the repository at this point in the history
…ogin-onclick

feat(components/topbar/user): handle clicks on navCtaLogin button
  • Loading branch information
ivanmlaborda authored May 23, 2024
2 parents b9fdc9d + 8838ea2 commit cdfc57f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/topbar/user/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export default function TopbarUser({
})

const handleCTAclick = navCTA && navCTA.onClick
const handleCTALoginClick = navCTALogin && navCTALogin.onClick

return (
<div ref={_topbarUserNode} className="sui-TopbarUser">
Expand Down Expand Up @@ -249,6 +250,7 @@ export default function TopbarUser({
title={navCTALogin.text}
shape={navCTALogin.shape}
size={atomButtonSizes.SMALL}
onClick={handleCTALoginClick}
>
{navCTALogin.text}
</AtomButton>
Expand Down Expand Up @@ -436,7 +438,7 @@ TopbarUser.propTypes = {
/**
* Call to action url.
*/
url: PropTypes.string.isRequired,
url: PropTypes.string,
/**
* Call to action optional icon.
*/
Expand Down

0 comments on commit cdfc57f

Please sign in to comment.