diff --git a/public/images/curriculumCrops/carrot_5.png b/public/images/curriculumCrops/carrot_5.png new file mode 100644 index 00000000..59fbc365 Binary files /dev/null and b/public/images/curriculumCrops/carrot_5.png differ diff --git a/src/components/CurriculumCard/CurriculumItem/index.tsx b/src/components/CurriculumCard/CurriculumItem/index.tsx new file mode 100644 index 00000000..2cf3f55d --- /dev/null +++ b/src/components/CurriculumCard/CurriculumItem/index.tsx @@ -0,0 +1,39 @@ +'use client'; + +import { Box, Checkbox, Flex, Text } from '@chakra-ui/react'; +import { useState } from 'react'; + +import { CurriculumItemProps } from '../types'; + +const CurriculumItem = ({ id, name, itemOrder, isCompleted }: CurriculumItemProps) => { + const [checked, setChecked] = useState(isCompleted); + + const handleCheckboxChange = () => { + setChecked(!checked); + }; + + return ( + + + {itemOrder.toString().padStart(2, '0')} + + + + + {name} + + + + + ); +}; + +export default CurriculumItem; diff --git a/src/components/CurriculumCard/index.tsx b/src/components/CurriculumCard/index.tsx new file mode 100644 index 00000000..d4cad08d --- /dev/null +++ b/src/components/CurriculumCard/index.tsx @@ -0,0 +1,47 @@ +import { Flex, Image, Card } from '@chakra-ui/react'; + +import CurriculumCardData from '@/mocks/curriculum'; + +import CurriculumItem from './CurriculumItem'; + +const CurriculumCard = () => { + return ( + + curriculum card + + + {CurriculumCardData.map((data) => { + return ( + + ); + })} + + + + ); +}; + +export default CurriculumCard; diff --git a/src/components/CurriculumCard/types.ts b/src/components/CurriculumCard/types.ts new file mode 100644 index 00000000..26b3a6c2 --- /dev/null +++ b/src/components/CurriculumCard/types.ts @@ -0,0 +1,6 @@ +export interface CurriculumItemProps { + id: number; + name: string; + itemOrder: number; + isCompleted: boolean; +} diff --git a/src/mocks/curriculum.ts b/src/mocks/curriculum.ts new file mode 100644 index 00000000..91ccdfff --- /dev/null +++ b/src/mocks/curriculum.ts @@ -0,0 +1,42 @@ +import { CurriculumItemProps } from '@/components/CurriculumCard/types'; + +const CurriculumCardData: CurriculumItemProps[] = [ + { + id: 1, + name: '커리큘럼1', + itemOrder: 1, + isCompleted: true, + }, + { + id: 2, + name: '커리큘럼2', + itemOrder: 2, + isCompleted: false, + }, + { + id: 3, + name: '커리큘럼3', + itemOrder: 3, + isCompleted: true, + }, + { + id: 4, + name: '커리큘럼4', + itemOrder: 4, + isCompleted: false, + }, + { + id: 5, + name: '커리큘럼5', + itemOrder: 5, + isCompleted: false, + }, + { + id: 6, + name: '커리큘럼6', + itemOrder: 6, + isCompleted: true, + }, +]; + +export default CurriculumCardData;