feat: unify theme system #7
@@ -99,7 +99,12 @@ impl RenderOnce for Field {
|
|||||||
let id = id.clone();
|
let id = id.clone();
|
||||||
move || format!("{id}-label")
|
move || format!("{id}-label")
|
||||||
})
|
})
|
||||||
.typeset(TextRole::Headline, cx)
|
.when(self.description.is_some(), |title| {
|
||||||
|
title.typeset(TextRole::Headline, cx)
|
||||||
|
})
|
||||||
|
.when(self.description.is_none(), |title| {
|
||||||
|
title.typeset(TextRole::Callout, cx)
|
||||||
|
})
|
||||||
.child(self.label.clone());
|
.child(self.label.clone());
|
||||||
|
|
||||||
let control = h_flex()
|
let control = h_flex()
|
||||||
|
|||||||
Reference in New Issue
Block a user