[react] 여러개 토글 버튼 구현
react에서 한 페이지 여러개의 토글 버튼 구현하기 입니다. 구현화면 구현 영상 부모요소 import React from 'react'; import ToggleBar from "../../components/myInfo/ToggleBar"; const Alarm = () => { const datas = [ { id: 1, title: '알림1', name: 'pushOnRecommendMeal' }, { id: 2, title: '알림2', name: 'pushOnEatRecord' }, { id: 3, title: '알림3', name: 'pushOnSymptomRecord' }, { id: 4, title: '알림4', name: 'pushOnWeeklyReport' }, ] return ( {..
[react] 체크박스 구현 (ft. 전체 선택, 전체 해제)
react에서 체크박스 부분 체크, 전체 체크, 전체 해제 구현입니다. 구현 영상 부모 컴포넌트 import React, { useState } from 'react'; import MealTimeCard from './MealTimeCard'; const MealChooseCard = () => { const [checkedItems, setCheckedItems] = useState([]) const datas = [ { title: '아침식사', time: '오전 7:00 ~ 9:00' }, { title: '아침간식', time: '오전 7:00 ~ 9:00' }, { title: '점심식사', time: '오전 11:30 ~ 오후 1:00' }, { title: '점심간식', time: '오전 ..