aboutsummaryrefslogtreecommitdiff
path: root/tests/fixtures/todo-app/index.html
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2023-08-13 18:35:31 +0530
committerAkshay Nair <phenax5@gmail.com>2023-08-13 18:35:31 +0530
commit2f3de513168ac8a912e4b6540907492437a5f834 (patch)
tree957c286eb8b0806d82279d7596f5f47425d3a9a8 /tests/fixtures/todo-app/index.html
parent95602d1b1ac5668772d5d400270b4209ee19057b (diff)
downloadcss-everything-2f3de513168ac8a912e4b6540907492437a5f834.tar.gz
css-everything-2f3de513168ac8a912e4b6540907492437a5f834.zip
feat: adds checked test case + implements pure actions flag + minor changes
Diffstat (limited to 'tests/fixtures/todo-app/index.html')
-rw-r--r--tests/fixtures/todo-app/index.html26
1 files changed, 15 insertions, 11 deletions
diff --git a/tests/fixtures/todo-app/index.html b/tests/fixtures/todo-app/index.html
index 25ccde7..bbf0963 100644
--- a/tests/fixtures/todo-app/index.html
+++ b/tests/fixtures/todo-app/index.html
@@ -8,31 +8,35 @@
}
#task-input-form {
+ /* prettier-ignore */
--cssx-on-submit:
prevent-default()
- add-children(task-list,
- instance(li#task-item, map(--text: attr(text-input, 'value')))
- )
- ;
+ add-children(
+ task-list,
+ instance(div#task-item, map(--text: attr(text-input, 'value')))
+ );
+ /* prettier-ignore */
--cssx-children:
- input#text-input[data-testid="add-task-input"]
- button#create-task-btn[type="submit"][data-testid="add-task-btn"]
+ input#text-input[data-testid=add-task-input]
+ button#create-task-btn[type=submit][data-testid=add-task-btn]
;
}
- #text-input {}
+ #text-input {
+ }
#create-task-btn {
- --cssx-text: "Submit";
+ --cssx-text: 'Submit';
}
- [data-instance="task-item"] {
+ [data-instance='task-item'] {
--text: default text;
- --checked: 0;
+ --checked: '0';
--cssx-on-mount: set-attr('data-testid', attr(id));
+ --cssx-on-click: update(--checked, '1');
}
- [data-instance="task-item"]::after {
+ [data-instance='task-item']::after {
content: var(--text);
}
</style>