diff --git a/components/topbar/user/src/index.js b/components/topbar/user/src/index.js index 231a424b5..637a2a655 100644 --- a/components/topbar/user/src/index.js +++ b/components/topbar/user/src/index.js @@ -24,11 +24,6 @@ const BODY_HAS_SCROLL_DISABLED = 'body-has-scroll-disabled' const TITLE_CLASS_NAME = 'sui-TopbarUser-title' const FLOW_BUTTON_CLASS_NAME = 'sui-TopbarUser-navButton' -// Experiment code -const EXPERIMENT_PUBLISH_LITERAL = 'Vender' -const EXPERIMENT_ACCESS_LITERAL = 'Acceder' -const EXPERIMENT_LOGIN_URL = '/login/?p=l' - /** * Render main navigation function. */ @@ -63,6 +58,7 @@ export default function TopbarUser({ ), navButton, navCTA, + navCTALogin, navMain, navUser, onToggle = () => {}, @@ -70,13 +66,8 @@ export default function TopbarUser({ shouldDisplayToggle = true, showBrandIcon = false, title, - toggleIcon = Menu, - isPublishSolidVariation, - isAccessSolidVariation, - isLogged + toggleIcon = Menu }) { - const isLoginButtonVariation = isPublishSolidVariation || isAccessSolidVariation - const _topbarUserNode = useRef(null) const _topbarUserToggleNode = useRef(null) const _windowWidth = useRef() @@ -203,10 +194,6 @@ export default function TopbarUser({ const handleCTAclick = navCTA && navCTA.onClick - const ctaClassName = cx('sui-TopbarUser-cta', { - 'sui-TopbarUser-cta--isPublishMainAction': isPublishSolidVariation - }) - return (
@@ -251,13 +238,28 @@ export default function TopbarUser({
{customContent ?
{customContent}
: <>} -
+
+ {navCTALogin && !customContent && ( +
+ + {navCTALogin.text} + +
+ )} {navCTA && !customContent && (
- {isLoginButtonVariation ? EXPERIMENT_PUBLISH_LITERAL : navCTA.text} - -
- )} - {!customContent && isLoginButtonVariation && !isLogged && ( -
- - {EXPERIMENT_ACCESS_LITERAL} + {navCTA.text}
)} @@ -441,6 +429,31 @@ TopbarUser.propTypes = { */ shape: PropTypes.string }), + /** + * CTALogin data. + */ + navCTALogin: PropTypes.shape({ + /** + * Call to action url. + */ + url: PropTypes.string.isRequired, + /** + * Call to action optional icon. + */ + icon: PropTypes.func, + /** + * Call to action text. + */ + text: PropTypes.string.isRequired, + /** + * Call to action click handler. + */ + onClick: PropTypes.func, + /** + * Atom shape customizable. + */ + shape: PropTypes.string + }), /** * Factory for the component that will hold any link. */ diff --git a/components/topbar/user/src/index.scss b/components/topbar/user/src/index.scss index fdaba21d2..84bced443 100644 --- a/components/topbar/user/src/index.scss +++ b/components/topbar/user/src/index.scss @@ -90,10 +90,6 @@ $w-topbar-user-nav: 90% !default; display: flex; gap: $m-m; - &--isPublishMainAction { - flex-direction: row-reverse; - } - &ButtonIcon { fill: currentColor !important; }