Skip to content

Commit

Permalink
Merge pull request #325 from EscolaLMS/feature/newcoursecard-progress
Browse files Browse the repository at this point in the history
new course card progress
  • Loading branch information
victazzz authored Feb 29, 2024
2 parents b0801f8 + 428b416 commit da7f2d0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/components/molecules/NewCourseCard/NewCourseCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import * as React from "react";
import { ReactNode, ReactChild, useMemo } from "react";
import styled from "styled-components";
import { ProgressBarProps } from "../../atoms/ProgressBar/ProgressBar";
import {
ProgressBar,
ProgressBarProps,
} from "../../atoms/ProgressBar/ProgressBar";
import { RatioBox } from "../../atoms/RatioBox/RatioBox";
import { getStylesBasedOnTheme } from "../../../utils/utils";
import { ExtendableStyledComponent } from "types/component";
Expand Down Expand Up @@ -199,7 +202,8 @@ export const NewCourseCard: React.FC<CourseCardProps> = (props) => {
onImageClick,
hideImage,
className = "",
price = "19.22",
price,
progress,
} = props;

const imageSrc = useMemo(() => {
Expand Down Expand Up @@ -275,6 +279,11 @@ export const NewCourseCard: React.FC<CourseCardProps> = (props) => {
)
)}
<div className="course-title">{title}</div>
{progress && (
<div>
<ProgressBar {...progress} />
</div>
)}
<div className="course-price">{price}</div>
</div>
</StyledCourseCard>
Expand Down

0 comments on commit da7f2d0

Please sign in to comment.