From 784c1ed4316472ec446cd5aa9c8c90ace391011b Mon Sep 17 00:00:00 2001 From: Sergey Yarkov Date: Mon, 3 Jan 2022 23:45:52 +0300 Subject: [PATCH] feat: added create lesson layout --- .../Forms/LessonForm/LessonForm.tsx | 76 ++++++++++++++++++- .../courses/create-lesson/create-lesson.tsx | 12 +++ src/pages/courses/edit/edit.tsx | 6 -- 3 files changed, 86 insertions(+), 8 deletions(-) diff --git a/src/components/Forms/LessonForm/LessonForm.tsx b/src/components/Forms/LessonForm/LessonForm.tsx index 3f14cb1..d31d406 100644 --- a/src/components/Forms/LessonForm/LessonForm.tsx +++ b/src/components/Forms/LessonForm/LessonForm.tsx @@ -11,12 +11,20 @@ import { Button, Textarea, Flex, + Icon, + IconButton, + Divider, } from '@chakra-ui/react'; +import { AddIcon, CloseIcon } from '@chakra-ui/icons'; import { UseFormReturn } from 'react-hook-form'; +import { MdOutlineFilePresent, MdUpload } from 'react-icons/md'; export type InputFields = { title: string; description: string; + duration: string; + video: File; + materials?: File[] | undefined; }; export type LessonFormPropsType = { @@ -42,7 +50,7 @@ const LessonForm: React.FC = ({ onSubmit, buttonLabel, isLo - e.g Variables in Javascript + e.g Introduction {errors.title?.message} @@ -50,7 +58,7 @@ const LessonForm: React.FC = ({ onSubmit, buttonLabel, isLo Description -