some styling
This commit is contained in:
@@ -5,7 +5,7 @@ const courseDataHandler: MessageHandler<CourseDataMessages> = {
|
|||||||
getDistribution({ data, sendResponse }) {
|
getDistribution({ data, sendResponse }) {
|
||||||
const { course } = data;
|
const { course } = data;
|
||||||
|
|
||||||
const dummyData = Array.from({ length: 18 }, () => Math.floor(Math.random() * 100));
|
const dummyData = Array.from({ length: 12 }, () => Math.floor(Math.random() * 100));
|
||||||
|
|
||||||
sendResponse(dummyData);
|
sendResponse(dummyData);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export default function Link(props: PropsWithChildren<Props>) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Text
|
<Text
|
||||||
|
color='bluebonnet'
|
||||||
{...passedProps}
|
{...passedProps}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
styles.link,
|
styles.link,
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
list-style-type: disc;
|
list-style-type: disc;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
|
max-height: 200px;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
padding: 0px 4px 4px;
|
padding: 0px 4px 4px;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export default function CourseHeader({ course, onClose }: Props) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{numInstructors > 1 && index === course.instructors.length - 1 ? '& ' : ''}
|
{numInstructors > 1 && index === course.instructors.length - 1 ? '& ' : ''}
|
||||||
<Link key={name} span size='medium' weight='semi_bold' color='bluebonnet' url={url}>
|
<Link key={name} span size='medium' weight='normal' url={url}>
|
||||||
{name}
|
{name}
|
||||||
</Link>
|
</Link>
|
||||||
{numInstructors > 2 && !isLast ? ', ' : ''}
|
{numInstructors > 2 && !isLast ? ', ' : ''}
|
||||||
@@ -81,7 +81,6 @@ export default function CourseHeader({ course, onClose }: Props) {
|
|||||||
span
|
span
|
||||||
size='medium'
|
size='medium'
|
||||||
weight='normal'
|
weight='normal'
|
||||||
color='bluebonnet'
|
|
||||||
url={getBuildingUrl(meeting.location?.building)}
|
url={getBuildingUrl(meeting.location?.building)}
|
||||||
disabled={!meeting.location?.building}
|
disabled={!meeting.location?.building}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable no-nested-ternary */
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import HighchartsReact from 'highcharts-react-official';
|
import HighchartsReact from 'highcharts-react-official';
|
||||||
import Highcharts from 'highcharts';
|
import Highcharts from 'highcharts';
|
||||||
@@ -73,7 +74,7 @@ export default function GradeDistribution({ course }: Props) {
|
|||||||
{
|
{
|
||||||
type: 'column',
|
type: 'column',
|
||||||
name: 'Grades',
|
name: 'Grades',
|
||||||
data: [],
|
data: Array.from({ length: 12 }, () => 0),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@@ -96,7 +97,16 @@ export default function GradeDistribution({ course }: Props) {
|
|||||||
// eslint-disable-next-line no-nested-ternary
|
// eslint-disable-next-line no-nested-ternary
|
||||||
// color: i < 8 ? '#2ECC71' : i < 10 ? '#F1C40F' : '#E74C3C',
|
// color: i < 8 ? '#2ECC71' : i < 10 ? '#F1C40F' : '#E74C3C',
|
||||||
// eslint-disable-next-line no-nested-ternary
|
// eslint-disable-next-line no-nested-ternary
|
||||||
color: i < 8 ? colors.cactus : i < 10 ? colors.sunshine : colors.speedway_brick,
|
color:
|
||||||
|
i < 3
|
||||||
|
? colors.turtle_pond
|
||||||
|
: i < 5
|
||||||
|
? colors.cactus
|
||||||
|
: i < 7
|
||||||
|
? colors.sunshine
|
||||||
|
: i < 10
|
||||||
|
? colors.tangerine
|
||||||
|
: colors.speedway_brick,
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user