Skip to content

Commit

Permalink
Use typography variants in TopGrid
Browse files Browse the repository at this point in the history
  • Loading branch information
Matushl committed Nov 12, 2023
1 parent 1f2be85 commit d494a90
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
6 changes: 0 additions & 6 deletions src/components/PageLayout/TopGrid/TopGrid.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@
// second row center column
grid-row: 2;
grid-column: 2;
font-size: 1.7rem;
font-weight: bold;
padding-left: 20px;
display: flex;
align-items: center;
text-transform: uppercase;
font-style: italic;
}

.semesterPicker {
Expand All @@ -40,8 +36,6 @@
}

.menuItem {
font-size: 1.3rem;
font-weight: bold;
padding: 8px;
margin: 10px;
}
Expand Down
17 changes: 13 additions & 4 deletions src/components/PageLayout/TopGrid/TopGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {Typography} from '@mui/material'
import clsx from 'clsx'
import Link from 'next/link'
import {useRouter} from 'next/router'
Expand All @@ -22,16 +23,24 @@ export const TopGrid: FC<TopGridProps> = ({title}) => {
<div className={styles.container}>
<div className={styles.menu}>
<div className={clsx(styles.menuItem, seminar === 'malynar' && styles.active)}>
<Link href="/malynar">Malynár</Link>
<Typography variant="button1">
<Link href="/malynar">Malynár</Link>
</Typography>
</div>
<div className={clsx(styles.menuItem, seminar === 'matik' && styles.active)}>
<Link href="/matik">Matik</Link>
<Typography variant="button1">
<Link href="/matik">Matik</Link>
</Typography>
</div>
<div className={clsx(styles.menuItem, seminar === 'strom' && styles.active)}>
<Link href="/strom">Strom</Link>
<Typography variant="button1">
<Link href="/strom">Strom</Link>
</Typography>
</div>
</div>
<div className={styles.title}>{title}</div>
<Typography variant="h1" className={styles.title}>
{title}
</Typography>
{(page === 'zadania' || page === 'vysledky') && (
<div className={styles.semesterPicker}>
<SemesterPicker page={page} />
Expand Down
3 changes: 0 additions & 3 deletions src/components/SemesterPicker/Dropdown.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
width: fit-content;
display: flex;
align-items: center;
text-transform: uppercase;
font-weight: bold;
font-style: italic;
position: relative;
margin: 0px 20px;

Expand Down
8 changes: 6 additions & 2 deletions src/components/SemesterPicker/Dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {Typography} from '@mui/material'
import clsx from 'clsx'
import Link from 'next/link'
import {FC, MouseEvent, useState} from 'react'
Expand Down Expand Up @@ -25,7 +26,10 @@ export const Dropdown: FC<{title: string; options: DropdownOption[]}> = ({title,

return (
<div className={styles.dropdown} onClick={handleClick} onMouseLeave={handleMouseLeave}>
{title} <div className={styles.arrow} />
<Typography variant="button2">
{title}
<div className={styles.arrow} />
</Typography>
<div className={clsx(styles.options, display && styles.displayOptions)}>
{options.map((option) => {
return (
Expand All @@ -34,7 +38,7 @@ export const Dropdown: FC<{title: string; options: DropdownOption[]}> = ({title,
key={option.id}
className={clsx(styles.option, option.selected && styles.selectedOption)}
>
{option.text}
<Typography variant="button2">{option.text}</Typography>
</Link>
)
})}
Expand Down

0 comments on commit d494a90

Please sign in to comment.