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