Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alexander-gomez-bonilla
Copy link

Fixes #2

export default function MobileMenu(props: IMobileMenuProps): JSX.Element {
const classes = useStyles();

return (<>{
Copy link
Member

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
Copy link
Member

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" >
Copy link
Member

Choose a reason for hiding this comment

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

No need for <> here 😊

Comment on lines +16 to +23
return (<>
{
isMobile ?
<MobileMenu sections={props.sections} />
:
<BrowserMenu sections={props.sections} />
}
</>)
Copy link
Member

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!

Comment on lines 8 to 9
// marginLeft: -theme.spacing(4),
// marginRight: -theme.spacing(4),
Copy link
Member

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>
Copy link
Member

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! 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Styling for mobile devices
2 participants