-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new: turn-signal * renaming and restructuring * updates * merge * bumps * update
- Loading branch information
Showing
11 changed files
with
356 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro-vtbot': minor | ||
--- | ||
|
||
Introducing a new tool for your transition from `<ViewTransitions />` to `@view-transitions {navigation: auto}`: The `<TurnSignal />` component enables seamless integration of forward and backward animations from `transition:animate` in cross-document transitions. Sync the direction of your animations with browser history navigation, or even with the page order of your site, if you prefer! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
import signalURL from '@vtbag/turn-signal?url'; | ||
import forcedTraversalURL from '@vtbag/turn-signal/forced-traversal?url'; | ||
export interface Props { | ||
selector?: string; | ||
forcedTraversal?: boolean; | ||
directionTypes?: string; | ||
directionAttribute?: string; | ||
} | ||
const { | ||
selector, | ||
forcedTraversal, | ||
directionTypes = '', | ||
directionAttribute = 'data-astro-transition, back, forward, forward', | ||
} = Astro.props; | ||
--- | ||
|
||
{forcedTraversal && <script is:inline src={forcedTraversalURL} />}{ | ||
( | ||
<script | ||
is:inline | ||
{...(selector ? { 'data-selector': selector } : {})} | ||
{...(directionTypes ? { 'data-direction-types': directionTypes } : {})} | ||
{...(directionAttribute ? { 'data-direction-attribute': directionAttribute } : {})} | ||
src={signalURL} | ||
/> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default function TurnSignal(_props: import('./TurnSignal.astro').Props): any; |
Oops, something went wrong.