mirror of
https://github.com/adoyle0/thaw.git
synced 2025-02-08 19:03:09 -05:00
feat: TimePicker scrollbar
This commit is contained in:
parent
69ddf6b02f
commit
61e3862a1d
2 changed files with 88 additions and 85 deletions
|
@ -3,7 +3,8 @@ mod theme;
|
|||
pub use theme::TimePickerTheme;
|
||||
|
||||
use crate::{
|
||||
use_theme, Button, ButtonSize, ButtonVariant, Icon, Input, InputSuffix, SignalWatch, Theme,
|
||||
use_theme, Button, ButtonSize, ButtonVariant, Icon, Input, InputSuffix, Scrollbar, SignalWatch,
|
||||
Theme,
|
||||
};
|
||||
use chrono::{Local, NaiveTime, Timelike};
|
||||
use leptos::*;
|
||||
|
@ -187,7 +188,7 @@ fn Panel(
|
|||
>
|
||||
<div class="thaw-time-picker-panel__time">
|
||||
<div class="thaw-time-picker-panel__time-hour" ref=hour_ref>
|
||||
|
||||
<Scrollbar size=6>
|
||||
{(0..24)
|
||||
.map(|hour| {
|
||||
let comp_ref = ComponentRef::<PanelTimeItemRef>::default();
|
||||
|
@ -215,10 +216,11 @@ fn Panel(
|
|||
}
|
||||
})
|
||||
.collect_view()}
|
||||
</Scrollbar>
|
||||
<div class="thaw-time-picker-panel__time-padding"></div>
|
||||
</div>
|
||||
<div class="thaw-time-picker-panel__time-minute" ref=minute_ref>
|
||||
|
||||
<Scrollbar size=6>
|
||||
{(0..60)
|
||||
.map(|minute| {
|
||||
let comp_ref = ComponentRef::<PanelTimeItemRef>::default();
|
||||
|
@ -246,10 +248,11 @@ fn Panel(
|
|||
}
|
||||
})
|
||||
.collect_view()}
|
||||
</Scrollbar>
|
||||
<div class="thaw-time-picker-panel__time-padding"></div>
|
||||
</div>
|
||||
<div class="thaw-time-picker-panel__time-second" ref=second_ref>
|
||||
|
||||
<Scrollbar size=6>
|
||||
{(0..60)
|
||||
.map(|second| {
|
||||
let comp_ref = ComponentRef::<PanelTimeItemRef>::default();
|
||||
|
@ -277,6 +280,7 @@ fn Panel(
|
|||
}
|
||||
})
|
||||
.collect_view()}
|
||||
</Scrollbar>
|
||||
<div class="thaw-time-picker-panel__time-padding"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
.thaw-time-picker-panel__time-minute,
|
||||
.thaw-time-picker-panel__time-second {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.thaw-time-picker-panel__time-item {
|
||||
|
|
Loading…
Add table
Reference in a new issue