-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Styling for mobile devices #16
base: main
Are you sure you want to change the base?
Conversation
export default function MobileMenu(props: IMobileMenuProps): JSX.Element { | ||
const classes = useStyles(); | ||
|
||
return (<>{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need to wrap it with <></>
if you're returning only one component IconButton
import { Button, IconButton, List, ListItem, Typography } from '@material-ui/core'; | ||
import { StaticImage } from "gatsby-plugin-image"; | ||
|
||
//interfaces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this comment adds much 😜
src="../../../images/codestar_logo_dark.svg" | ||
/> | ||
</Typography> | ||
<List component="nav" aria-label="secondary mailbox folders" > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for <>
here 😊
return (<> | ||
{ | ||
isMobile ? | ||
<MobileMenu sections={props.sections} /> | ||
: | ||
<BrowserMenu sections={props.sections} /> | ||
} | ||
</>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
return isMobile ? <MobileMenu sections={props.sections} /> : <BrowserMenu sections={props.sections} />
should also work!
// marginLeft: -theme.spacing(4), | ||
// marginRight: -theme.spacing(4), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe these can be removed?
{section.title} | ||
</Link> | ||
))} | ||
<MainMenu sections={sections}></MainMenu> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to have this extracted! 👍🏻
Fixes #2