form: Fix form label required not in same line. (#1013)

This commit is contained in:
parent
f7d536531d
commit
819161ec58
1 changed files with 9 additions and 7 deletions
|
|
@ -377,13 +377,15 @@ impl RenderOnce for FormField {
|
|||
.gap_1()
|
||||
.items_center()
|
||||
.when_some(self.label, |this, builder| {
|
||||
this.child(builder.render(window, cx)).when(
|
||||
self.required,
|
||||
|this| {
|
||||
this.child(
|
||||
div().text_color(cx.theme().danger).child("*"),
|
||||
)
|
||||
},
|
||||
this.child(
|
||||
h_flex().gap_1().child(builder.render(window, cx)).when(
|
||||
self.required,
|
||||
|this| {
|
||||
this.child(
|
||||
div().text_color(cx.theme().danger).child("*"),
|
||||
)
|
||||
},
|
||||
),
|
||||
)
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue