Skip to content

Commit

Permalink
fix: code-review
Browse files Browse the repository at this point in the history
  • Loading branch information
Raubzeug committed Dec 25, 2023
1 parent 22f293b commit 89aa963
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/components/theme/getBodyClassName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}

0 comments on commit 89aa963

Please sign in to comment.