Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .storybook/decorators/withTheme.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {useTheme} from '@gravity-ui/uikit';
import {StoryContext, Story as StoryType} from '@storybook/react';
import React from 'react';
import {Story as StoryType, StoryContext} from '@storybook/react';
import {useTheme} from '@yandex-cloud/uikit';

export function withTheme(Story: StoryType, context: StoryContext) {
const themeValue = context.globals.theme;
Expand Down
4 changes: 2 additions & 2 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import '@yandex-cloud/uikit/styles/styles.scss';
import '@gravity-ui/uikit/styles/styles.scss';

import React from 'react';
import {MINIMAL_VIEWPORTS} from '@storybook/addon-viewport';
import {CloudTheme} from './theme';
import {withTheme} from './decorators/withTheme';
import {ThemeProvider} from '@yandex-cloud/uikit';
import {ThemeProvider} from '@gravity-ui/uikit';

const withContextProvider = (Story, context) => {
const theme = context.globals.theme;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ of the sort list. A simple Click sorts the table by this column only. Sorting or
| rowClassName | `Function` | | | A method that sets the class for a string `(row, index, isFooterRow, isHeaderRow) => (<string> )` |
| rowKey | `Function` | | | A method that returns the value of react-key `(row, index) => (<scalar_type_value> )`. The default method returns `row.id` &#124;&#124;` index` |
| initialSortOrder | `Object` | | | Initial sorting in the format`{columnId: <string>, order: <DataTable.ASCENDING `&#124;` DataTable.DESCENDING>}` or a list of such objects. |
| theme | `String` | | 'yandex-cloud' | The name of the theme. To use the built-in table theme, use the `'legacy'` value. For compatibility with @yandex-cloud/uikit colors, use `'yandex-cloud'` (default) |
| theme | `String` | | 'yandex-cloud' | The name of the theme. To use the built-in table theme, use the `'legacy'` value. For compatibility with @gravity-ui/uikit colors, use `'yandex-cloud'` (default) |
| onSort | `Function` | | | Sort listener `([{columnId: <string>, order: <DataTable.ASCENDING `&#124;` DataTable.DESCENDING>}]) => void`. Use it to save the sorting state and pass it to the `initialSortOrder` on page refresh. |
| sortOrder | `Object` | | | Sorting in the format `{columnId: <string>, order: <DataTable.ASCENDING `&#124;` DataTable.DESCENDING>}` or a list of such objects. |
| visibleRowIndex | `Function` | | | A method `(row, index) => number` that returns the row index shown in the column enabled by the `displayIndices` flag. Use it to specify a correct row index when applying external sorting |
Expand Down
188 changes: 124 additions & 64 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@gravity-ui/prettier-config": "^1.0.1",
"@gravity-ui/stylelint-config": "^2.0.0",
"@gravity-ui/tsconfig": "^1.0.0",
"@gravity-ui/uikit": "^4.0.5",
"@storybook/addon-essentials": "6.4.9",
"@storybook/preset-scss": "1.0.3",
"@storybook/react": "6.4.9",
Expand All @@ -58,8 +59,6 @@
"@types/react-dom": "16.9.14",
"@types/react-list": "0.8.7",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@yandex-cloud/i18n": "^0.1.1",
"@yandex-cloud/uikit": "^1.0.0",
"bem-cn-lite": "4.0.0",
"copyfiles": "2.4.1",
"css-loader": "5.2.7",
Expand Down