Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dirty-buttons-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@devup-ui/wasm": patch
---

Add id to special prop
6 changes: 3 additions & 3 deletions libs/extractor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ mod tests {
reset_class_map();
assert_debug_snapshot!(extract(
"test.tsx",
r"import {Box} from '@devup-ui/core'
<Box padding={1} ref={ref} data-test={1} role={2} children={[]} onClick={()=>{}} aria-valuenow={24} key={2} tabIndex={1} />
",
r#"import {Box} from '@devup-ui/core'
<Box padding={1} ref={ref} data-test={1} role={2} children={[]} onClick={()=>{}} aria-valuenow={24} key={2} tabIndex={1} id="id" />
"#,
ExtractOption {
package: "@devup-ui/core".to_string(),
css_file: None
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: libs/extractor/src/lib.rs
expression: "extract(\"test.tsx\",\nr\"import {Box} from '@devup-ui/core'\n <Box padding={1} ref={ref} data-test={1} role={2} children={[]} onClick={()=>{}} aria-valuenow={24} key={2} tabIndex={1} />\n \",\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap()"
expression: "extract(\"test.tsx\",\nr#\"import {Box} from '@devup-ui/core'\n <Box padding={1} ref={ref} data-test={1} role={2} children={[]} onClick={()=>{}} aria-valuenow={24} key={2} tabIndex={1} id=\"id\" />\n \"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap()"
---
ExtractOutput {
styles: [
Expand All @@ -14,5 +14,5 @@ ExtractOutput {
},
),
],
code: "import \"@devup-ui/core/devup-ui.css\";\n<div ref={ref} data-test={1} role={2} children={[]} onClick={() => {}} aria-valuenow={24} key={2} tabIndex={1} className=\"d0\" />;\n",
code: "import \"@devup-ui/core/devup-ui.css\";\n<div ref={ref} data-test={1} role={2} children={[]} onClick={() => {}} aria-valuenow={24} key={2} tabIndex={1} id=\"id\" className=\"d0\" />;\n",
}
1 change: 1 addition & 0 deletions libs/extractor/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ static SPECIAL_PROPERTIES: Lazy<HashSet<&str>> = Lazy::new(|| {
"role",
"ref",
"key",
"id",
"alt",
"type",
"src",
Expand Down
5 changes: 5 additions & 0 deletions libs/sheet/src/snapshots/sheet__tests__create_css-5.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: libs/sheet/src/lib.rs
expression: sheet.create_css()
---
".test::placeholder{background:red}.test:hover{background:red}.test:active{background:blue}"
Loading