diff --git a/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Default-light-chromium-linux.png b/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Default-light-chromium-linux.png index 4d8b21112..be27bf45a 100644 Binary files a/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Default-light-chromium-linux.png and b/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Default-light-chromium-linux.png differ diff --git a/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Default-light-webkit-linux.png b/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Default-light-webkit-linux.png index 377290b0f..e15663735 100644 Binary files a/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Default-light-webkit-linux.png and b/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Default-light-webkit-linux.png differ diff --git a/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Tick-light-chromium-linux.png b/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Tick-light-chromium-linux.png index bc698ed70..bfde412b6 100644 Binary files a/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Tick-light-chromium-linux.png and b/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Tick-light-chromium-linux.png differ diff --git a/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Tick-light-webkit-linux.png b/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Tick-light-webkit-linux.png index 1a1bf52e7..b70f95df1 100644 Binary files a/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Tick-light-webkit-linux.png and b/src/blocks/Table/__snapshots__/Table.visual.test.tsx-snapshots/Table-render-stories-Tick-light-webkit-linux.png differ diff --git a/src/blocks/Table/__stories__/Table.mdx b/src/blocks/Table/__stories__/Table.mdx index 5d08ce4dc..bc69a6d44 100644 --- a/src/blocks/Table/__stories__/Table.mdx +++ b/src/blocks/Table/__stories__/Table.mdx @@ -4,6 +4,7 @@ import {StoryTemplate} from '../../../demo/StoryTemplate.mdx'; import * as TableStories from './Table.stories.tsx'; + ## Parameters @@ -11,5 +12,18 @@ import * as TableStories from './Table.stories.tsx'; `title: string` — Title on the left -`table: Table` — Table content +`table: TableProps` — Table content + +--- + +## TableProps + +- `content: string[][]` — Двумерный массив со строками и ячейками таблицы. +- `legend?: string[]` — Подписи (легенда) под таблицей. +- `hideLegend?: boolean` — Скрыть легенду, если `true`. +- `justify?: Justify[]` — Выравнивание колонок; одно значение на колонку. +- `marker?: LegendTableMarkerType` — Тип маркера для элементов легенды. +- `caption?: string` — Используется только как доступное имя (не отображается визуально). + + diff --git a/src/blocks/Table/__stories__/Table.stories.tsx b/src/blocks/Table/__stories__/Table.stories.tsx index 706b68335..4abf8058a 100644 --- a/src/blocks/Table/__stories__/Table.stories.tsx +++ b/src/blocks/Table/__stories__/Table.stories.tsx @@ -1,8 +1,8 @@ import {Meta, StoryFn} from '@storybook/react'; -import {PageConstructor} from '../../../containers/PageConstructor'; -import {TableBlockModel} from '../../../models'; -import Table from '../Table'; +import {blockTransform} from '../../../../.storybook/utils'; +import {TableBlockModel, TableBlockProps} from '../../../models'; +import Table, {TableBlock} from '../Table'; import data from './data.json'; @@ -12,7 +12,7 @@ export default { } as Meta; const DefaultTemplate: StoryFn = (args) => ( - + ); export const Default = DefaultTemplate.bind({});