@slashid/react
Version:
React SDK for the /id platform
23 lines • 898 B
TypeScript
import { Theme } from "../../theme/theme.css";
import React from "react";
export type ThemeProps = {
theme?: Theme;
className?: string;
};
type Props = {
children: React.ReactNode;
theme?: ThemeProps["theme"];
className?: ThemeProps["className"];
};
/**
* We cannot rely on useLayoutEffect to set the correct class names on the <body> element server side.
*/
export declare const ServerThemeRoot: ({ children }: Props) => import("react/jsx-runtime").JSX.Element;
/**
* This component will apply the necessary class names to the <body> element.
* That way the child components on all levels can use the theming properties.
* This also helps with any components portaling out of the SlashIDProvider hierarchy.
*/
export declare function ThemeRoot({ children, theme, className }: Props): import("react/jsx-runtime").JSX.Element;
export {};
//# sourceMappingURL=index.d.ts.map