diff --git a/src/pages/content-management/AddNewLessonPage.tsx b/src/pages/content-management/AddNewLessonPage.tsx index 24d60c7..8f5a759 100644 --- a/src/pages/content-management/AddNewLessonPage.tsx +++ b/src/pages/content-management/AddNewLessonPage.tsx @@ -99,6 +99,12 @@ function isDirectVideoFile(url: string): boolean { return /\.(mp4|webm|ogg|mov|m4v)$/.test(clean) } +function stepNodeClass(active: boolean, completed: boolean): string { + if (active) return "bg-grayScale-900 text-white ring-4 ring-grayScale-200" + if (completed) return "bg-grayScale-700 text-white" + return "border-2 border-grayScale-300 bg-white text-grayScale-400" +} + export function AddNewLessonPage() { const { categoryId, courseId, subModuleId } = useParams() const navigate = useNavigate() @@ -277,19 +283,18 @@ export function AddNewLessonPage() {
step.number - ? "bg-brand-500 text-white" - : "border-2 border-grayScale-300 bg-white text-grayScale-400" - }`} + className={`flex h-9 w-9 items-center justify-center rounded-full text-xs font-semibold shadow-sm sm:h-10 sm:w-10 sm:text-sm ${stepNodeClass( + currentStep === step.number, + currentStep > step.number, + )}`} > {currentStep > step.number ? : step.number}
{step.label}
- {index < STEPS.length - 1 ?
: null} + {index < STEPS.length - 1 ? ( +
step.number ? "bg-grayScale-700" : "bg-grayScale-200"}`} /> + ) : null}
))}
@@ -297,19 +302,30 @@ export function AddNewLessonPage() { ) : null} {currentStep === 1 ? ( - -

Step 1: Context

+ +
+

Step 1: Context

+

+ Define lesson metadata that will be stored in the linked question set. +

+
+
- setLessonTitle(e.target.value)} placeholder="Enter lesson title" /> + setLessonTitle(e.target.value)} + placeholder="Enter lesson title" + className="h-11" + />