Skip to content

Commit

Permalink
fix: readme information
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloricciuti committed Oct 8, 2023
1 parent 3d04a37 commit fd0a8fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/bright-humans-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'sveltekit-view-transition': patch
---

fix readme information
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ Here's a simple example of this in action:
* in the post/[id] page we have a matching title transition name
*/
name: 'title',
applyImmediately(navigation) {
applyImmediately({ navigation }) {
// this will apply the title view transition to this element
// only if it's the one that matches the id we are coming from
// so for example if we were visiting /post/1 and this is the
Expand Down Expand Up @@ -317,10 +317,10 @@ So, completing the example above:
* if and when the shouldApply function returns true
*/
name: 'title',
applyImmediately(navigation) {
applyImmediately({ navigation }) {
return navigation?.from?.params?.id === post.id.toString();
},
shouldApply(navigation) {
shouldApply({ navigation }) {
// if the params.id i'm navigating to is equal to the id of the post
// we add the title transition name.
return navigation?.to?.params?.id === post.id.toString();
Expand Down

1 comment on commit fd0a8fb

@vercel
Copy link

@vercel vercel bot commented on fd0a8fb Oct 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.