Skip to content

Commit

Permalink
chore(csr example): use animation for enter instead of transition
Browse files Browse the repository at this point in the history
  • Loading branch information
brofrain committed Oct 26, 2023
1 parent d020b38 commit b0ea932
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/csr/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

<title>CSR example</title>

<link data-trunk rel="tailwind-css" href="src/tailwind.css" />
<link data-trunk rel="tailwind-css" href="src/style.css" />
</head>
</html>
2 changes: 1 addition & 1 deletion examples/csr/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ fn App() -> impl IntoView {
key=|item| item.id
children=|item| item.view
enter_from_class="opacity-0"
enter_class="duration-1000"
enter_class="animate-fade-in-bottom-left"
move_class="duration-1000"
leave_class="opacity-0 duration-1000"
appear=true
Expand Down
18 changes: 18 additions & 0 deletions examples/csr/src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@keyframes fade-in-bottom-left {
from {
opacity: 0;
transform: translate3d(-150%, 150%, 0);
}
to {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}

.animate-fade-in-bottom-left {
animation: fade-in-bottom-left 1s ease-out 1;
}
3 changes: 0 additions & 3 deletions examples/csr/src/tailwind.css

This file was deleted.

0 comments on commit b0ea932

Please sign in to comment.