date-picker-modal
Version:
A React date picker modal for selecting dates with a Persian calendar
129 lines (113 loc) • 2.57 kB
CSS
/* Modal Overlay */
.modalOverlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: flex-end;
z-index: 1000;
}
/* Modal Content */
.modalContent {
position: relative;
width: 100%;
background: #ffffff;
border-radius: 24px 24px 0 0;
padding: 16px 0; /* حذف فاصله چپ و راست */
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
/* Modal Header */
.modalHeader {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
padding: 0 16px; /* فاصله داخلی برای تنظیم محتوا */
}
/* Close Button */
.closeButton {
background: none;
border: none;
font-size: 24px;
color: #332f5c;
cursor: pointer;
}
/* Modal Title */
.modalTitle {
font-family: "IRANSansXFaNum";
font-size: 16px;
font-weight: 700;
color: #332f5c;
margin: 0; /* حذف margin اضافی */
text-align: center;
flex: 1; /* برای پر کردن فضای بین دکمه و متن */
}
/* Divider */
.divider {
width: 100%;
height: 1px;
background-color: #dddee1;
margin: 16px 0;
}
/* Date Selector */
.dateSelector {
display: flex;
justify-content: center;
align-items: center;
margin: 16px 0;
}
.dateItem {
font-size: 14px;
font-weight: 500;
color: #d4d4d4;
opacity: 0.9;
transition: all 0.3s ease;
}
.dateItem.active {
font-size: 18px;
font-weight: 700;
color: #332f5c;
opacity: 1;
}
/* Vertical Divider */
.dividerVertical {
width: 42px;
height: 141px;
/* background-color: #dddee1; */
}
/* Confirm Button */
.confirmButton {
width: 100%;
max-width: 345px;
height: 47px;
background-color: #695cd5;
color: #ffffff;
font-weight: 400;
border: none;
border-radius: 24px;
cursor: pointer;
margin-top: 32px;
margin-bottom: 32px;
}
.confirmButton:hover {
background-color: #584ac0;
}
.line {
width: 100%;
height: 1px;
background-color: #8d8d8d; /* رنگ خط */
}
.column {
display: flex;
flex-direction: column;
align-items: center;
gap: 17.5px;
width: 71px;
}