Use when_else()
This commit is contained in:
parent
8fc15c05c5
commit
ee45db8a78
1 changed files with 5 additions and 4 deletions
|
@ -98,10 +98,11 @@ impl RenderOnce for Key {
|
||||||
|
|
||||||
div()
|
div()
|
||||||
.py_0()
|
.py_0()
|
||||||
.when(single_char, |el| {
|
.when_else(
|
||||||
el.w(rems(14. / 16.)).flex().flex_none().justify_center()
|
single_char,
|
||||||
})
|
|el| el.w(rems(14. / 16.)).flex().flex_none().justify_center(),
|
||||||
.when(!single_char, |el| el.px_0p5())
|
|el| el.px_0p5(),
|
||||||
|
)
|
||||||
.h(rems(14. / 16.))
|
.h(rems(14. / 16.))
|
||||||
.text_ui()
|
.text_ui()
|
||||||
.line_height(relative(1.))
|
.line_height(relative(1.))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue