Skip to content

Commit

Permalink
Fix: Layout menu mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
rboixaderg committed Mar 3, 2024
1 parent 7df3300 commit dbb68c6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
0.28.1
------
- Fix: Layout menu mobile

0.28.0
------
- Feat: Update to typescript

0.27.0
------
- Feat: Add label to input list
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.28.0",
"version": "0.28.1",
"repository": {
"type": "git",
"url": "[email protected]:guillotinaweb/guillotina_react.git"
Expand Down
21 changes: 16 additions & 5 deletions src/guillo-gmi/components/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { useState } from 'react'
import { Auth } from '../lib/auth'
import { Icon } from './ui/icon'
import { classnames } from '../lib/helpers'

interface Props {
children: React.ReactNode
onLogout: () => void
auth: Auth
}
export function Layout({ children, onLogout, auth }: Props) {
const [isMenuOpen, setIsMenuOpen] = useState(false)
const doLogout = () => {
auth.logout()
onLogout()
Expand All @@ -16,24 +19,32 @@ export function Layout({ children, onLogout, auth }: Props) {
<>
<header>
<nav className="navbar" role="navigation" aria-label="main navigation">
<div className="navbar-brand">
<div className="navbar-brand" style={{ alignItems: 'center' }}>
<a className="navbar-item" href="/">
<img src="/logo.svg" alt="Guillotina logo" height="80" />
</a>
<a
<div
id="burger"
role="button"
className="navbar-burger burger"
className={classnames([
'navbar-burger',
'burger',
isMenuOpen && 'is-active',
])}
aria-label="menu"
aria-expanded="false"
data-target="navbarmenu"
onClick={() => setIsMenuOpen(!isMenuOpen)}
>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
</div>
<div id="navbarmenu" className="navbar-menu">
<div
id="navbarmenu"
className={classnames(['navbar-menu', isMenuOpen && 'is-active'])}
>
<div className="navbar-start"></div>
<div className="navbar-end">
<div className="navbar-item">
Expand Down

0 comments on commit dbb68c6

Please sign in to comment.