Skip to content

Commit

Permalink
chane style of resultsRow
Browse files Browse the repository at this point in the history
  • Loading branch information
vikibrezinova committed Dec 9, 2023
1 parent 5df8ae8 commit 92fe952
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
6 changes: 2 additions & 4 deletions src/components/Results/ResultsRow.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
display: contents;
}

.rowWrapper > div {
padding: 0px 10px;
}

.rowWrapper:hover > div {
background-color: #000;
color: #fff;
Expand All @@ -21,6 +17,7 @@
.nameAndSchool {
display: grid;
grid-template-rows: 2fr 1fr;
padding: 0px 10px;
}

.name {
Expand Down Expand Up @@ -48,6 +45,7 @@
justify-content: center;
// border: 1px solid red;
grid-template-rows: max-content max-content;
padding: 0px 10px;

> div {
// border: 1px solid red;
Expand Down
24 changes: 15 additions & 9 deletions src/components/Results/ResultsRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ export const ResultsRow: FC<{result: Result}> = ({result}) => {

return (
<div className={styles.rowWrapper}>
<Typography variant="h1" component="span" className={styles.rank}>
{rank_changed && rank_start + '.'}
</Typography>
<div className={styles.rank}>
<Typography variant="h1" component="span">
{rank_changed && rank_start + '.'}
</Typography>
</div>
<div className={styles.nameAndSchool}>
<Typography variant="h2" component="span" className={styles.name}>
{registration.profile.first_name + ' ' + registration.profile.last_name}
Expand All @@ -51,9 +53,11 @@ export const ResultsRow: FC<{result: Result}> = ({result}) => {
{registration.school.name + ' ' + registration.school.street + ' ' + registration.school.city}
</Typography>
</div>
<Typography variant="h3" component="span" fontWeight={400} fontStyle="italic" className={styles.grade}>
{registration.grade}
</Typography>
<div className={styles.grade}>
<Typography variant="h3" component="span" fontWeight={400} fontStyle="italic">
{registration.grade}
</Typography>
</div>
<div className={styles.score}>
{solutions.map((series, index) => (
<div key={index}>
Expand All @@ -68,9 +72,11 @@ export const ResultsRow: FC<{result: Result}> = ({result}) => {
</div>
))}
</div>
<Typography variant="h3" component="span" fontStyle="italic" className={styles.totalScore}>
{total}
</Typography>
<div className={styles.totalScore}>
<Typography variant="h3" component="span" fontStyle="italic">
{total}
</Typography>
</div>
</div>
)
}

0 comments on commit 92fe952

Please sign in to comment.