Skip to content

Commit f849e58

Browse files
author
mayintao3
committed
Merge branch 'feat/capi' of https://github.com/NervJS/parse-css-to-stylesheet into feat/capi
2 parents c450d8f + 358c3e2 commit f849e58

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/style_propetries/text_overflow.rs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,11 @@ impl ToExpr for TextOverflow {
1717
fn to_expr(&self) -> PropertyTuple {
1818
PropertyTuple::One(
1919
CSSPropertyType::TextOverflow,
20-
Expr::Object(ObjectLit {
21-
span: DUMMY_SP,
22-
props: vec![
23-
PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp {
24-
key: PropName::Ident(Ident::new("overflow".into(), DUMMY_SP)),
25-
value: match self {
26-
TextOverflow::Clip => generate_expr_enum!(style_property_enum::ArkUI_TextOverflow::ARKUI_TEXT_OVERFLOW_CLIP),
27-
TextOverflow::Ellipsis => generate_expr_enum!(style_property_enum::ArkUI_TextOverflow::ARKUI_TEXT_OVERFLOW_ELLIPSIS),
28-
TextOverflow::None => generate_expr_enum!(style_property_enum::ArkUI_TextOverflow::ARKUI_TEXT_OVERFLOW_NONE),
29-
}.into()
30-
}))),
31-
],
32-
})
20+
match self {
21+
TextOverflow::Clip => generate_expr_enum!(style_property_enum::ArkUI_TextOverflow::ARKUI_TEXT_OVERFLOW_CLIP),
22+
TextOverflow::Ellipsis => generate_expr_enum!(style_property_enum::ArkUI_TextOverflow::ARKUI_TEXT_OVERFLOW_ELLIPSIS),
23+
TextOverflow::None => generate_expr_enum!(style_property_enum::ArkUI_TextOverflow::ARKUI_TEXT_OVERFLOW_NONE),
24+
}.into()
3325
)
3426
}
3527

0 commit comments

Comments
 (0)