diff --git a/src/components/layout/LayoutProvider/__stories__/Layout.mdx b/src/components/layout/LayoutProvider/__stories__/Layout.mdx index 3306d2eaf4..e25eadbd8b 100644 --- a/src/components/layout/LayoutProvider/__stories__/Layout.mdx +++ b/src/components/layout/LayoutProvider/__stories__/Layout.mdx @@ -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 ( - + {...} ); @@ -138,7 +138,7 @@ We use `mobile-first` approach. It means that you should adapt you app to deskto } }; - + {...} ``` diff --git a/src/components/useList/utils/defaultFilterItems.ts b/src/components/useList/utils/defaultFilterItems.ts index 5e3adc0d9b..35b5bda998 100644 --- a/src/components/useList/utils/defaultFilterItems.ts +++ b/src/components/useList/utils/defaultFilterItems.ts @@ -6,10 +6,6 @@ export function defaultFilterItems( items: ListItemType[], filterFn: (data: T) => boolean, ): ListItemType[] { - if (process.env.NODE_ENV !== 'production') { - console.time('defaultFilterItems'); - } - const getChildren = (result: ListItemType[], item: ListItemType) => { if (isTreeItemGuard(item) && item.children) { const children = item.children.reduce(getChildren, []); @@ -31,8 +27,5 @@ export function defaultFilterItems( const res = items.reduce[]>(getChildren, []); - if (process.env.NODE_ENV !== 'production') { - console.timeEnd('defaultFilterItems'); - } return res; } diff --git a/src/components/useList/utils/flattenItems.ts b/src/components/useList/utils/flattenItems.ts index 54fb0e98de..8c013ed556 100644 --- a/src/components/useList/utils/flattenItems.ts +++ b/src/components/useList/utils/flattenItems.ts @@ -9,10 +9,6 @@ export function flattenItems( expandedById: Record = {}, getItemId?: (item: T) => ListItemId, ): ParsedFlattenState { - if (process.env.NODE_ENV !== 'production') { - console.time('flattenItems'); - } - const getNestedIds = ( order: string[], item: ListItemType, @@ -50,9 +46,6 @@ export function flattenItems( idToFlattenIndex[index] = item; } - if (process.env.NODE_ENV !== 'production') { - console.timeEnd('flattenItems'); - } return { visibleFlattenIds, idToFlattenIndex, diff --git a/src/components/useList/utils/getListParsedState.ts b/src/components/useList/utils/getListParsedState.ts index e675209966..8b26c0d0d8 100644 --- a/src/components/useList/utils/getListParsedState.ts +++ b/src/components/useList/utils/getListParsedState.ts @@ -39,10 +39,6 @@ export function getListParsedState( */ getItemId?: (item: T) => ListItemId, ): ListParsedStateResult { - if (process.env.NODE_ENV !== 'production') { - console.time('getListParsedState'); - } - const result: ListParsedStateResult = { itemsById: {}, groupsState: {}, @@ -137,9 +133,5 @@ export function getListParsedState( isTreeItemGuard(item) ? traverseTreeItem({item, index}) : traverseItem({item, index}), ); - if (process.env.NODE_ENV !== 'production') { - console.timeEnd('getListParsedState'); - } - return result; }