Skip to content

Commit

Permalink
Merge branch 'main' into feat-select-fix-doc-custom-popup
Browse files Browse the repository at this point in the history
  • Loading branch information
mournfulCoroner authored Apr 25, 2024
2 parents 740952b + 575477a commit 25b3299
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 25 deletions.
6 changes: 3 additions & 3 deletions src/components/layout/LayoutProvider/__stories__/Layout.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ _You can override default values on project level:_
```tsx
import {ThemeProvider, LayoutTheme} from '@gravity-ui/uikit';

const theme: LayoutTheme = {
const config: LayoutTheme = {
spaceBaseSize: 5,
};

export const App = () => {
return (
<ThemeProvider layout={{theme}}>
<ThemeProvider layout={{config}}>
{...}
</ThemeProvider>
);
Expand Down Expand Up @@ -138,7 +138,7 @@ We use `mobile-first` approach. It means that you should adapt you app to deskto
}
};

<ThemeProvider layout={{theme: APP_LAYOUT_THEME}}>
<ThemeProvider layout={{config: APP_LAYOUT_THEME}}>
{...}
</ThemeProvider>
```
Expand Down
7 changes: 0 additions & 7 deletions src/components/useList/utils/defaultFilterItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ export function defaultFilterItems<T>(
items: ListItemType<T>[],
filterFn: (data: T) => boolean,
): ListItemType<T>[] {
if (process.env.NODE_ENV !== 'production') {
console.time('defaultFilterItems');
}

const getChildren = (result: ListItemType<T>[], item: ListItemType<T>) => {
if (isTreeItemGuard(item) && item.children) {
const children = item.children.reduce(getChildren, []);
Expand All @@ -31,8 +27,5 @@ export function defaultFilterItems<T>(

const res = items.reduce<ListItemType<T>[]>(getChildren, []);

if (process.env.NODE_ENV !== 'production') {
console.timeEnd('defaultFilterItems');
}
return res;
}
7 changes: 0 additions & 7 deletions src/components/useList/utils/flattenItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ export function flattenItems<T>(
expandedById: Record<ListItemId, boolean> = {},
getItemId?: (item: T) => ListItemId,
): ParsedFlattenState {
if (process.env.NODE_ENV !== 'production') {
console.time('flattenItems');
}

const getNestedIds = (
order: string[],
item: ListItemType<T>,
Expand Down Expand Up @@ -50,9 +46,6 @@ export function flattenItems<T>(
idToFlattenIndex[index] = item;
}

if (process.env.NODE_ENV !== 'production') {
console.timeEnd('flattenItems');
}
return {
visibleFlattenIds,
idToFlattenIndex,
Expand Down
8 changes: 0 additions & 8 deletions src/components/useList/utils/getListParsedState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ export function getListParsedState<T>(
*/
getItemId?: (item: T) => ListItemId,
): ListParsedStateResult<T> {
if (process.env.NODE_ENV !== 'production') {
console.time('getListParsedState');
}

const result: ListParsedStateResult<T> = {
itemsById: {},
groupsState: {},
Expand Down Expand Up @@ -137,9 +133,5 @@ export function getListParsedState<T>(
isTreeItemGuard(item) ? traverseTreeItem({item, index}) : traverseItem({item, index}),
);

if (process.env.NODE_ENV !== 'production') {
console.timeEnd('getListParsedState');
}

return result;
}

0 comments on commit 25b3299

Please sign in to comment.