page-transition 0.1.0-beta.54 → 0.1.0-beta.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/context/TransitionContext.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ A page transition library for the Next.js App Router.
|
|
|
10
10
|
- Scroll restoration
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
|
-
 
|
|
14
14
|
|
|
15
15
|
`npm install page-transition@beta`
|
|
16
16
|
|
|
@@ -19,7 +19,7 @@ Import your page transition styles and wrap your page content with `TransitionPr
|
|
|
19
19
|
|
|
20
20
|
```tsx
|
|
21
21
|
import { TransitionProvider } from "page-transition"
|
|
22
|
-
import '
|
|
22
|
+
import './transition-styles.css'
|
|
23
23
|
|
|
24
24
|
export default function RootLayout({ children }: LayoutProps<"/">) {
|
|
25
25
|
return (
|
|
@@ -159,7 +159,7 @@ const {
|
|
|
159
159
|
overlayWrapper,
|
|
160
160
|
overlayItems,
|
|
161
161
|
secondItems
|
|
162
|
-
|
|
162
|
+
} = useTransitionContext()
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
#### CSS/SCSS Examples
|
|
@@ -12,7 +12,7 @@ export function useTransitionContext() {
|
|
|
12
12
|
}
|
|
13
13
|
export function TransitionProvider(props) {
|
|
14
14
|
const { scroll = 'auto' } = props;
|
|
15
|
-
return (props.mode === '
|
|
16
|
-
_jsx(
|
|
17
|
-
_jsx(
|
|
15
|
+
return (props.mode === 'manual' ?
|
|
16
|
+
_jsx(ManualTransitionProvider, { scroll: scroll, children: props.children }) :
|
|
17
|
+
_jsx(CssTransitionProvider, { outside: props.outside, scroll: scroll, options: props.options, children: props.children }));
|
|
18
18
|
}
|