diff --git a/README.md b/README.md index 3fe2f2f098..d2edd26615 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ it is possible to generate initial CSS-classes during SSR: import {getInitialRootClassName} from '@gravity-ui/uikit'; const theme = 'light'; -const rootClassName = getInitialRootClassName(theme); +const rootClassName = getInitialRootClassName({theme}); ``` ```js diff --git a/src/components/theme/getBodyClassName.ts b/src/components/theme/getBodyClassName.ts index c8402496d5..5c658a49f7 100644 --- a/src/components/theme/getBodyClassName.ts +++ b/src/components/theme/getBodyClassName.ts @@ -20,6 +20,7 @@ export function getRootClassName( return bNew(modifier, addition); } -export function getInitialRootClassName(theme?: RealTheme) { +export function getInitialRootClassName(props: {theme?: RealTheme} = {}) { + const {theme} = props; return getRootClassName({theme}); }