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

Font sizes overhaul - first usages #162

Merged
merged 8 commits into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions src/components/PageLayout/MenuMain/MenuMain.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@
}

.menuItem {
// TODO(#127): 30/16=1.875rem
font-size: 1.7rem;
font-weight: 800;
text-transform: uppercase;
background-color: transparent;
margin: 0px 40px;
padding: 8px 0px;
Expand All @@ -76,8 +72,7 @@
a {
display: inline-block;
padding: 0px 5px;
// TODO(#127): 5px (5/16=0.3125rem)
border-bottom: 0.3rem solid white;
border-bottom: 5px solid white;
color: white;
text-align: center;
}
Expand All @@ -89,7 +84,7 @@

a {
color: black;
// TODO(#127): 10px (10/16=0.625rem). ale treba asi nastavit height celeho menu itemu, nech to neskace
border-bottom: 0.3rem solid black;
border-color: black;
border-width: 10px;
Copy link
Member

Choose a reason for hiding this comment

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

pls no

}
}
12 changes: 9 additions & 3 deletions src/components/PageLayout/MenuMain/MenuMain.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {Theme, Typography, useMediaQuery} from '@mui/material'
import {useQuery} from '@tanstack/react-query'
import axios from 'axios'
import clsx from 'clsx'
Expand Down Expand Up @@ -31,15 +32,18 @@ export const MenuMain: FC = () => {
})
const menuItems = menuItemsData?.data ?? []

const lg = useMediaQuery<Theme>((theme) => theme.breakpoints.up('lg'))
const iconSize = lg ? 40 : 30

return (
<>
{!isVisible && (
<div className={clsx(styles.menuButton, styles.menuOpenButton)} onClick={toggleMenu}>
<Menu width={40} height={40} />
<Menu width={iconSize} height={iconSize} />
</div>
)}
<div className={clsx(styles.menu, isVisible && styles.visible)}>
<CloseButton size={40} onClick={toggleMenu} className={clsx(styles.menuButton, styles.menuCloseButton)} />
<CloseButton size={iconSize} onClick={toggleMenu} className={clsx(styles.menuButton, styles.menuCloseButton)} />
{menuItemsIsLoading && (
<div className={styles.loading}>
<Loading />
Expand Down Expand Up @@ -70,7 +74,9 @@ const MenuMainItem: FC<{caption: string; url: string}> = ({caption, url}) => {

return (
<div className={clsx(styles.menuItem, active && styles.active)}>
<Link href={url}>{caption}</Link>
<Typography variant="h2" textTransform="uppercase">
Copy link
Member

Choose a reason for hiding this comment

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

podla mna variant="button1"

<Link href={url}>{caption}</Link>
</Typography>
</div>
)
}