Skip to content

Commit d95cf64

Browse files
authored
Merge pull request #210 from dev-five-git/maintain-line-height
Maintain lineHeight
2 parents 6b3c6bc + c193372 commit d95cf64

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

libs/extractor/src/extract_style/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ static MAINTAIN_VALUE_PROPERTIES: phf::Set<&str> = phf_set! {
2626
"zIndex",
2727
"lineClamp",
2828
"fontWeight",
29+
"lineHeight",
2930
"scale",
3031
"aspectRatio",
3132
"flexGrow",

libs/extractor/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@ export {
17291729
extract(
17301730
"test.jsx",
17311731
r#"import {Flex} from '@devup-ui/core'
1732-
<Flex opacity={1} zIndex={2} fontWeight={900} scale={2} flex={1} />
1732+
<Flex opacity={1} zIndex={2} fontWeight={900} scale={2} flex={1} lineHeight={1} />
17331733
"#,
17341734
ExtractOption {
17351735
package: "@devup-ui/core".to_string(),

libs/extractor/src/snapshots/extractor__tests__maintain_value.snap

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
source: libs/extractor/src/lib.rs
3-
expression: "ToBTreeSet::from(extract(\"test.js\",\nr#\"import {Flex} from '@devup-ui/core'\n <Flex opacity={1} zIndex={2} fontWeight={900} scale={2} flex={1} />\n \"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())"
3+
expression: "ToBTreeSet::from(extract(\"test.jsx\",\nr#\"import {Flex} from '@devup-ui/core'\n <Flex opacity={1} zIndex={2} fontWeight={900} scale={2} flex={1} lineHeight={1} />\n \"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())"
44
---
55
ToBTreeSet {
66
styles: {
@@ -33,6 +33,15 @@ ToBTreeSet {
3333
style_order: None,
3434
},
3535
),
36+
Static(
37+
ExtractStaticStyle {
38+
property: "lineHeight",
39+
value: "1",
40+
level: 0,
41+
selector: None,
42+
style_order: None,
43+
},
44+
),
3645
Static(
3746
ExtractStaticStyle {
3847
property: "opacity",
@@ -61,5 +70,5 @@ ToBTreeSet {
6170
},
6271
),
6372
},
64-
code: "import \"@devup-ui/core/devup-ui.css\";\n<div className=\"d0 d1 d2 d3 d4 d5\" />;\n",
73+
code: "import \"@devup-ui/core/devup-ui.css\";\n<div className=\"d0 d1 d2 d3 d4 d5 d6\" />;\n",
6574
}

0 commit comments

Comments
 (0)