bibekg / react-schedule-selector

A mobile-friendly when2meet-style grid-based schedule selector
MIT License
147 stars 51 forks source link

Small mode #31

Closed maddie-wang closed 4 years ago

maddie-wang commented 4 years ago

can we have a small mode? small mode is very important to me because the scheduler is way too long on my chrome extension, and I can't change the height of the cells. its not nice for the user to have to scroll to fill out all the times

unfortunately even if i use renderDateCell to make each cell 15px height, it won't change the height of the cells. the cells seem to have a fix height of 25px.

image

bibekg commented 4 years ago

Thanks for filing the issue. It looks like the 25px fixed height is coming from the TimeLabelCell on the left.

image

I'll put together a fix for it soon but a short-term solution in the interim to unblock you may be to add this custom CSS (selecting any div with a class starting with ScheduleSelector__TimeLabelCell) and unsetting the height.

div[class^=ScheduleSelector__TimeLabelCell] {
  height: 'unset' !important;
}
bibekg commented 4 years ago

Just published v3.0 which removes the fixed height for the time label and also introduces a renderTimeLabel prop that will optionally let you customize the time label exactly how you'd like.