diff --git a/README.md b/README.md index 3f1d3ab..f0e4f40 100644 --- a/README.md +++ b/README.md @@ -201,8 +201,9 @@ If no props are passed to ``, below is the default configuratio - `shadow`: a smooth shadow for the TopLoader. (set it to `false` to disable it) - `template`: to include custom HTML attributes for the TopLoader. - `zIndex`: defines zIndex for the TopLoader. -- `showAtBottom`: To show the TopLoader at bottom. (increase height for the TopLoader to ensure it's visibility at the mobile devices) -- `showForHashAnchor`: To show for "#" url or not. (set it to `false` to disable it) +- `showAtBottom`: to show the TopLoader at bottom. (increase height for the TopLoader to ensure it's visibility at the mobile devices). +- `showForHashAnchor`: to show for "#" url or not. (set it to `false` to disable it). +- `nonce`: to add nonces to the ` ); @@ -245,7 +250,7 @@ const NextTopLoader = ({ // To debug the anchor target: // console.log('Given target is', (anchor as HTMLAnchorElement).target); - const isExternalLink = ((anchor as HTMLAnchorElement).target as React.HTMLAttributeAnchorTarget) !== '' ; + const isExternalLink = ((anchor as HTMLAnchorElement).target as React.HTMLAttributeAnchorTarget) !== ''; // Check for Special Schemes const isSpecialScheme = ['tel:', 'mailto:', 'sms:', 'blob:', 'download:'].some((scheme) => diff --git a/src/pages.tsx b/src/pages.tsx index 6d69431..fcdb2ce 100644 --- a/src/pages.tsx +++ b/src/pages.tsx @@ -22,6 +22,7 @@ export const PagesTopLoader = ({ template, zIndex = 1600, showAtBottom = false, + nonce, }: NextTopLoaderProps): JSX.Element => { const defaultColor = '#29d'; const defaultHeight = 3; @@ -34,8 +35,8 @@ export const PagesTopLoader = ({ !shadow && shadow !== undefined ? '' : shadow - ? `box-shadow:${shadow}` - : `box-shadow:0 0 10px ${color},0 0 5px ${color}`; + ? `box-shadow:${shadow}` + : `box-shadow:0 0 10px ${color},0 0 5px ${color}`; // Check if to show at bottom const positionStyle = showAtBottom ? 'bottom: 0;' : 'top: 0;'; @@ -45,7 +46,7 @@ export const PagesTopLoader = ({ * CSS Styles for the NextTopLoader */ const styles = ( - );