You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
909 B
25 lines
909 B
|
2 months ago
|
import React from 'react';
|
||
|
|
import type { ScriptHTMLAttributes } from 'react';
|
||
|
|
export interface ScriptProps extends ScriptHTMLAttributes<HTMLScriptElement> {
|
||
|
|
strategy?: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive' | 'worker';
|
||
|
|
id?: string;
|
||
|
|
onLoad?: (e: any) => void;
|
||
|
|
onReady?: () => void | null;
|
||
|
|
onError?: (e: any) => void;
|
||
|
|
children?: React.ReactNode;
|
||
|
|
stylesheets?: string[];
|
||
|
|
}
|
||
|
|
/**
|
||
|
|
* @deprecated Use `ScriptProps` instead.
|
||
|
|
*/
|
||
|
|
export type Props = ScriptProps;
|
||
|
|
export declare function handleClientScriptLoad(props: ScriptProps): void;
|
||
|
|
export declare function initScriptLoader(scriptLoaderItems: ScriptProps[]): void;
|
||
|
|
/**
|
||
|
|
* Load a third-party scripts in an optimized way.
|
||
|
|
*
|
||
|
|
* Read more: [Next.js Docs: `next/script`](https://nextjs.org/docs/app/api-reference/components/script)
|
||
|
|
*/
|
||
|
|
declare function Script(props: ScriptProps): JSX.Element | null;
|
||
|
|
export default Script;
|