ScheduleModal.js 1.47 KB
Newer Older
Kim, Subin's avatar
Kim, Subin committed
1
import Item from "../AdminScheduleItem.js";
Kim, Subin's avatar
Kim, Subin committed
2
import moment from 'moment';
Kim, Subin's avatar
Kim, Subin committed
3
4
import styles from "./modal.module.scss";

Kim, Subin's avatar
Kim, Subin committed
5
const ScheduleModal = ({ dateShow, setDateShow }) => {
Kim, Subin's avatar
Kim, Subin committed
6
    return (
Kim, Subin's avatar
Kim, Subin committed
7
8
9
10
11
12
13
14
15
16
17
18
19
        <>
            {dateShow.show ? <div className="modal-backdrop fade show"></div> : null}
            <div className={"modal " + (dateShow.show ? "d-block" : "d-none")} id="scheduleModal" data-bs-backdrop="static" data-bs-keyboard="false" tabIndex="-1" aria-labelledby="scheduleModalLabel" aria-hidden="true">
                <div className="modal-dialog modal-sm modal-dialog-centered modal-dialog-scrollable">
                    <div className="modal-content">
                        <div className={`modal-header ${styles.header}`}>
                            <h5 className="modal-title text-white mx-auto" id="scheduleModalLabel">{moment(dateShow.date).format("MM.DD")}</h5>
                            <button type="button" className={`btn-close btn-close-white ms-0 ${styles.closeBtn}`} data-bs-dismiss="modal" aria-label="Close" onClick={() => setDateShow({ ...dateShow, show: false })}></button>
                        </div>
                        <div className={`modal-body text-dark ${styles.body}`}>
                            <Item />
                            <p className="text-center mb-0">선택한 날짜에 일정이 없습니다.</p>
                        </div>
Kim, Subin's avatar
Kim, Subin committed
20
21
22
                    </div>
                </div>
            </div>
Kim, Subin's avatar
Kim, Subin committed
23
        </>
Kim, Subin's avatar
Kim, Subin committed
24
25
26
27
    )
}

export default ScheduleModal