Skip to content

Commit

Permalink
feat: deprecate old navbar (#494)
Browse files Browse the repository at this point in the history
* feat: remove deprecated component

* feat: remove navbar

* feat: rename Navbar2 to Navbar

* fear: rename

* fix: not export old component

* fix: rename

* fix: wrong imports

* fix: prettier

* wip

* rename css

* rollback

BREAKING CHANGE: rename Navbar2 to Navbar, and removes old Navbar and UserInformation components
  • Loading branch information
lauti7 authored Jan 16, 2024
1 parent 4a36f84 commit 54c77ba
Show file tree
Hide file tree
Showing 33 changed files with 689 additions and 2,863 deletions.
2 changes: 1 addition & 1 deletion src/components/Atlas/Atlas.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const hoverFillLayer: Layer = (x, y) => {

const App = ({ children }) => (
<>
<Navbar activePage="marketplace" isFullscreen />
<Navbar activePage="marketplace" />
<Page isFullscreen>{children}</Page>
<Footer isFullscreen />
</>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.dui-navbar2__menu.dui-navbar2__menu-desktop {
.dui-navbar__menu.dui-navbar__menu-desktop {
display: flex;
height: 100%;
}

.dui-navbar2__menu.dui-navbar2__menu-mobile {
.dui-navbar__menu.dui-navbar__menu-mobile {
position: absolute;
display: none;
flex-direction: column;
Expand All @@ -18,7 +18,7 @@
}

@media (max-width: 991px) {
.dui-navbar2__menu.dui-navbar2__menu-mobile {
.dui-navbar__menu.dui-navbar__menu-mobile {
display: flex;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import classNames from 'classnames'

import { MenuItem } from '../MenuItem/MenuItem'
import { Navbar2Pages } from '../Navbar2.types'
import { NavbarPages } from '../Navbar.types'
import { MainMenuProps } from './MainMenu.types'

import './MainMenu.css'
Expand All @@ -12,34 +12,34 @@ export const MainMenu = (props: MainMenuProps) => {
return (
<div
className={classNames(
'dui-navbar2__menu',
!props.isMobile && 'dui-navbar2__menu-desktop',
props.isMobile && 'dui-navbar2__menu-mobile'
'dui-navbar__menu',
!props.isMobile && 'dui-navbar__menu-desktop',
props.isMobile && 'dui-navbar__menu-mobile'
)}
>
<MenuItem
{...menuItemProps}
section={Navbar2Pages.MARKETPLACE}
section={NavbarPages.MARKETPLACE}
title={i18n.marketplace}
/>
<MenuItem
{...menuItemProps}
section={Navbar2Pages.CREATE}
section={NavbarPages.CREATE}
title={i18n.create}
/>
<MenuItem
{...menuItemProps}
section={Navbar2Pages.EXPLORE}
section={NavbarPages.EXPLORE}
title={i18n.explore}
/>
<MenuItem
{...menuItemProps}
section={Navbar2Pages.LEARN}
section={NavbarPages.LEARN}
title={i18n.learn}
/>
<MenuItem
{...menuItemProps}
section={Navbar2Pages.GOVERNANCE}
section={NavbarPages.GOVERNANCE}
title={i18n.governance}
/>
</div>
Expand Down
12 changes: 12 additions & 0 deletions src/components/Navbar/MainMenu/MainMenu.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { NavbarMenuI18nProps, NavbarPages } from '../Navbar.types'

export type MainMenuProps = {
activePage: NavbarPages | string
onToggleShowSubMenu: (
e: React.MouseEvent,
show: boolean,
section?: NavbarPages
) => void
i18n: NavbarMenuI18nProps
isMobile?: boolean
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Navbar2Pages } from '../Navbar2.types'
import { NavbarPages } from '../Navbar.types'

export type MenuItemProps = {
activePage: Navbar2Pages | string
section: Navbar2Pages
activePage: NavbarPages | string
section: NavbarPages
title: React.ReactNode
onToggleShowSubMenu: (
e: React.MouseEvent,
show: boolean,
section?: Navbar2Pages
section?: NavbarPages
) => void
isMobile?: boolean
}
Loading

1 comment on commit 54c77ba

@vercel
Copy link

@vercel vercel bot commented on 54c77ba Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

decentraland-ui – ./

decentraland-ui-decentraland1.vercel.app
decentraland-ui-git-master-decentraland1.vercel.app

Please sign in to comment.