UNPKG

642 BTypeScriptView Raw
1type UseRootElementNameParameters = {
2 /**
3 * The HTML element expected to be rendered, for example 'div', 'button' etc
4 * @default ''
5 */
6 rootElementName?: keyof HTMLElementTagNameMap;
7 /**
8 * The name of the component using useRootElementName.
9 * For debugging purposes.
10 */
11 componentName?: string;
12};
13/**
14 * @ignore - do not document.
15 *
16 * Use this function determine the host element correctly on the server (in a SSR context, for example Next.js)
17 */
18export declare function useRootElementName(parameters: UseRootElementNameParameters): [string, (instance: HTMLElement | null) => void];
19export {};