Skip to content

Commit

Permalink
style(assessment-statistics): use new custom slider
Browse files Browse the repository at this point in the history
  • Loading branch information
syoopie committed Sep 17, 2024
1 parent 8974dff commit 1565750
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FC, useState } from 'react';
import { defineMessages } from 'react-intl';
import { Slider, Typography } from '@mui/material';
import { Typography } from '@mui/material';
import { QuestionType } from 'types/course/assessment/question';
import {
AllAnswerDetails,
Expand All @@ -9,6 +9,7 @@ import {

import Accordion from 'lib/components/core/layouts/Accordion';
import Link from 'lib/components/core/Link';
import CustomSlider from 'lib/components/extensions/CustomSlider';
import useTranslation from 'lib/hooks/useTranslation';
import { formatLongDateTime } from 'lib/moment';

Expand Down Expand Up @@ -91,7 +92,7 @@ const AllAttemptsDisplay: FC<Props> = (props) => {
</Accordion>
{answerSubmittedTimes.length > 1 && (
<div className="w-[calc(100%_-_17rem)] mx-auto">
<Slider
<CustomSlider
defaultValue={currentAnswerMarker.value}
marks={answerSubmittedTimes}
max={currentAnswerMarker.value}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { FC, useState } from 'react';
import { defineMessages } from 'react-intl';
import { Card, CardContent, Slider, Typography } from '@mui/material';
import { Card, CardContent, Typography } from '@mui/material';

import { CourseStudent, GroupManager } from 'course/statistics/types';
import LinearProgressWithLabel from 'lib/components/core/LinearProgressWithLabel';
import Link from 'lib/components/core/Link';
import CustomSlider from 'lib/components/extensions/CustomSlider';
import Table, { ColumnTemplate } from 'lib/components/table';
import {
DEFAULT_MINI_TABLE_ROWS_PER_PAGE,
Expand Down Expand Up @@ -365,7 +366,7 @@ const StudentPerformanceTable: FC<Props> = (props) => {
: t(translations.correctness),
})}
</Typography>
<Slider
<CustomSlider
aria-label="Highlight Percentage"
className="flex flex-row align-right max-w-[500px] min-w-[300px] mb-2"
defaultValue={highlightPercentage}
Expand Down

0 comments on commit 1565750

Please sign in to comment.