Reduce `attributes` function line length in `Text`
This commit is contained in:
parent
7ab7178004
commit
04d91aa717
|
@ -169,13 +169,7 @@ extension Text {
|
|||
|
||||
return [
|
||||
"style": """
|
||||
\(font?.styles.filter {
|
||||
if weight != nil {
|
||||
return $0.key != "font-weight"
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}.inlineStyles ?? "")
|
||||
\(font?.styles.filter { weight != nil ? $0.key != "font-weight" : true }.inlineStyles ?? "")
|
||||
\(font == nil ? "font-family: \(Font.Design.default.description);" : "")
|
||||
color: \((color ?? .primary).cssValue(environment));
|
||||
font-style: \(italic ? "italic" : "normal");
|
||||
|
|
Loading…
Reference in New Issue