Skip to content

Commit

Permalink
chore: remove extra stories
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanVor committed Jan 14, 2025
1 parent 3a6a6bc commit 5057fe1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/Table/__stories__/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ const WithTableSelectionTemplate: StoryFn<TableProps<DataItem>> = (args) => {
};
export const HOCWithTableSelection = WithTableSelectionTemplate.bind({});

export const DEFAULT_SETTINGS = columns.map((x) => ({id: x.id, isSelected: true}));
const DEFAULT_SETTINGS = columns.map((x) => ({id: x.id, isSelected: true}));
// ---------------------------------
const WithTableSettingsTemplate: StoryFn<TableProps<DataItem>> = (args, context) => {
const [settings, setSettings] = React.useState<TableSettingsData>(DEFAULT_SETTINGS);
Expand Down
5 changes: 3 additions & 2 deletions src/components/Table/__tests__/helpersPlaywright.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {composeStories} from '@storybook/react';
import type {TableColumnConfig, TableProps} from '../Table';
import {Table} from '../Table';
import * as DefaultTableStories from '../__stories__/Table.stories';
import {DEFAULT_SETTINGS} from '../__stories__/Table.stories';
import type {TableSettingsData} from '../hoc';
import {withTableSettings} from '../hoc';

Expand Down Expand Up @@ -49,7 +48,9 @@ export const TestTableWithSettings = (props: Partial<TableProps<DataItem>>) => {
};
});

const [settings, setSettings] = React.useState<TableSettingsData>(DEFAULT_SETTINGS);
const [settings, setSettings] = React.useState<TableSettingsData>(
columns.map(({id}) => ({id, isSelected: true})),
);

return (
<TableWithSettings
Expand Down

0 comments on commit 5057fe1

Please sign in to comment.