Skip to content

Styling for mobile devices#16

Open
orchestratedbyalex wants to merge 2 commits into
mainfrom
alexander-gomez-bonilla/issue2
Open

Styling for mobile devices#16
orchestratedbyalex wants to merge 2 commits into
mainfrom
alexander-gomez-bonilla/issue2

Conversation

@orchestratedbyalex
Copy link
Copy Markdown

Fixes #2

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

return (<>{
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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