Skip to content

Commit

Permalink
Makes the viewTransitionsFallback property optional in the Starlight …
Browse files Browse the repository at this point in the history
…integration.
  • Loading branch information
martrapp committed Apr 6, 2024
1 parent cd5d8cb commit b35d054
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/fluffy-badgers-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro-vtbot": patch
---

Makes the viewTransitionsFallback property optional in the Starlight integration.
4 changes: 2 additions & 2 deletions components/starlight/Base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import ReplacementSwap from '../ReplacementSwap.astro';
import Connector from './StarlightConnector.astro';
export interface Props extends StarlightProps {
viewTransitionsFallback: Parameters<typeof ViewTransitions>[0]['fallback'];
viewTransitionsFallback?: Parameters<typeof ViewTransitions>[0]['fallback'];
}
const mainTransitionScope = (Astro.props['data-astro-transition-scope'] as string) || 'none';
---

<slot/>
<ViewTransitions fallback={Astro.props.viewTransitionsFallback} />
<ViewTransitions fallback={Astro.props.viewTransitionsFallback ?? "animate"} />
<ReplacementSwap rootAttributesToPreserve="data-theme" />
<Connector />
<meta name="vtbot-main-transition-scope" content={mainTransitionScope} />
Expand Down

0 comments on commit b35d054

Please sign in to comment.