time-period-selector-react
Version:
TimePeriodSelector - Drag to Select Time Period of the Day
108 lines (88 loc) • 1.67 kB
CSS
*, :before, :after {
box-sizing: border-box;
border: 0 solid #e5e7eb;
}
table {
text-indent: 0;
border-color: inherit;
border-collapse: collapse;
}
.time-period-selector {
background-color: #fff;
border: 1px solid #e5e7eb;
width: 520px;
padding: 1.25rem;
}
@media (width >= 768px) {
.time-period-selector {
width: 700px;
}
}
.time-period-header {
justify-content: space-between;
align-items: center;
margin-bottom: 1.25rem;
display: flex;
}
.time-period-title {
margin: 0;
}
.clear-button {
cursor: pointer;
color: #3b82f6;
}
.clear-button:hover {
color: #2563eb;
}
.time-period-table {
border: 1px solid #e5e7eb;
width: 100%;
}
.time-period-thead {
border-bottom: 1px solid #e5e7eb;
}
.time-period-th {
text-align: center;
border: 1px solid #e5e7eb;
padding: .25rem;
font-size: .75rem;
font-weight: normal;
}
.time-period-hour-th {
text-align: center;
padding: .25rem;
font-size: .75rem;
font-weight: normal;
}
.time-period-day {
text-align: center;
border-bottom: 1px solid #e5e7eb;
width: 3.5rem;
height: 2rem;
font-size: .75rem;
}
.time-period-hour {
cursor: pointer;
background-color: #fff;
border: 1px solid #e5e7eb;
width: 20px;
height: 30px;
transition: background-color .2s;
}
.time-period-hour:hover {
background-color: #eff6ff;
}
.time-period-hour.selected, .time-period-hour.selected:hover {
background-color: #3b82f6;
}
.time-period-divider {
border-bottom: 1px solid #e5e7eb;
margin: 1.25rem 0;
}
.time-period-selected-times {
margin-bottom: .5rem;
}
.time-period-selected-times-text {
white-space: pre-wrap;
font-size: .75rem;
}