Skip to content

Commit 5a710f7

Browse files
committed
style: code style
1 parent 449d927 commit 5a710f7

File tree

5 files changed

+25
-16
lines changed

5 files changed

+25
-16
lines changed

thaw/src/checkbox/checkbox_item.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ pub fn CheckboxItem(
3939
</Checkbox>
4040
}
4141
} else {
42-
view! {
43-
<Checkbox class value=(is_checked, checked.write_only()) />
44-
}
42+
view! { <Checkbox class value=(is_checked, checked.write_only())/> }
4543
}
4644
}

thaw/src/layout/mod.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,16 @@ pub fn Layout(
4848
class=class_list![gen_class(position), class.map(| c | move || c.get())]
4949
style=move || style.as_ref().map(|s| s.get())
5050
>
51-
<Scrollbar content_class content_style=Signal::derive(move || format!("{} {}", sider_style.get().unwrap_or_default(), content_style.as_ref().map_or(String::new(), |s| s.get())))>
51+
<Scrollbar
52+
content_class
53+
content_style=Signal::derive(move || {
54+
format!(
55+
"{} {}",
56+
sider_style.get().unwrap_or_default(),
57+
content_style.as_ref().map_or(String::new(), |s| s.get()),
58+
)
59+
})
60+
>
5261
{children()}
5362
</Scrollbar>
5463
</div>

thaw/src/message/message_provider.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,7 @@ pub fn MessageProvider(
5757
each=move || message_list.get()
5858
key=|message| message.0
5959
children=move |message| {
60-
view! {
61-
<Message
62-
message
63-
on_close=handle_after_leave
64-
/>
65-
}
60+
view! { <Message message on_close=handle_after_leave/> }
6661
}
6762
/>
6863

thaw/src/scrollbar/mod.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,15 @@ pub fn Scrollbar(
281281

282282
<div class="thaw-scrollbar__container" ref=container_ref on:scroll=on_scroll>
283283
<div
284-
class=class_list!["thaw-scrollbar__content", content_class.map(|c| move || c.get())]
285-
style=move || format!("width: fit-content; {}", content_style.as_ref().map_or(String::new(), |s| s.get()))
284+
class=class_list![
285+
"thaw-scrollbar__content", content_class.map(| c | move || c.get())
286+
]
287+
style=move || {
288+
format!(
289+
"width: fit-content; {}",
290+
content_style.as_ref().map_or(String::new(), |s| s.get()),
291+
)
292+
}
286293
ref=content_ref
287294
>
288295
{children()}

thaw/src/time_picker/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ fn Panel(
216216
}
217217
})
218218
.collect_view()}
219-
</Scrollbar>
219+
</Scrollbar>
220220
<div class="thaw-time-picker-panel__time-padding"></div>
221221
</div>
222222
<div class="thaw-time-picker-panel__time-minute" ref=minute_ref>
@@ -247,8 +247,8 @@ fn Panel(
247247
/>
248248
}
249249
})
250-
.collect_view()}
251-
</Scrollbar>
250+
.collect_view()}
251+
</Scrollbar>
252252
<div class="thaw-time-picker-panel__time-padding"></div>
253253
</div>
254254
<div class="thaw-time-picker-panel__time-second" ref=second_ref>
@@ -280,7 +280,7 @@ fn Panel(
280280
}
281281
})
282282
.collect_view()}
283-
</Scrollbar>
283+
</Scrollbar>
284284
<div class="thaw-time-picker-panel__time-padding"></div>
285285
</div>
286286
</div>

0 commit comments

Comments
 (0)