next-nprogress-bar
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "next-nprogress-bar", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "NextJS progress bar compatible with new app directory", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -34,2 +34,3 @@ <div align="center"> | ||
- [Use](#use) | ||
- [Migrating from v1 to v2](#migrating-from-v1-to-v2) | ||
- [Issues](#issues) | ||
@@ -315,2 +316,53 @@ - [LICENSE](#license) | ||
## Migrating from v1 to v2 | ||
### Pages directory | ||
```jsx | ||
// before (v1) | ||
import ProgressBar from 'next-nprogress-bar'; | ||
<ProgressBar | ||
height="4px" | ||
color="#fffd00" | ||
options={{ showSpinner: false }} | ||
shallowRouting | ||
/>; | ||
// after (v2) | ||
import { PagesProgressBar as ProgressBar } from 'next-nprogress-bar'; | ||
<ProgressBar | ||
height="4px" | ||
color="#fffd00" | ||
options={{ showSpinner: false }} | ||
shallowRouting | ||
/>; | ||
``` | ||
### App directory | ||
```jsx | ||
// before (v1) | ||
import ProgressBar from 'next-nprogress-bar'; | ||
<ProgressBar | ||
height="4px" | ||
color="#fffd00" | ||
options={{ showSpinner: false }} | ||
appDirectory | ||
shallowRouting | ||
/>; | ||
// after (v2) | ||
import { AppProgressBar as ProgressBar } from 'next-nprogress-bar'; | ||
<ProgressBar | ||
height="4px" | ||
color="#fffd00" | ||
options={{ showSpinner: false }} | ||
shallowRouting | ||
/>; | ||
``` | ||
## Issues | ||
@@ -317,0 +369,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34538
375