Skip to content

Commit

Permalink
Restore chromatic ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Oct 3, 2023
1 parent 60748de commit ac738ec
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions code/renderers/react/template/stories/ts-argtypes.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { Args, Parameters, StoryContext } from '@storybook/types';
import { inferControls } from '@storybook/preview-api';
import { ThemeProvider, themes, convert } from '@storybook/theming';

// import { within } from '@storybook/testing-library';
import { within } from '@storybook/testing-library';
import { component as TsFunctionComponentComponent } from './docgen-components/ts-function-component/input';
import { component as TsFunctionComponentInlineDefaultsComponent } from './docgen-components/ts-function-component-inline-defaults/input';
import { component as TsReactFcGenericsComponent } from './docgen-components/8143-ts-react-fc-generics/input';
Expand Down Expand Up @@ -78,14 +78,14 @@ export const TsComponentProps = { parameters: { component: TsComponentPropsCompo

export const TsJsdoc = { parameters: { component: TsJsdocComponent } };

// const addChromaticIgnore = async (element: HTMLElement) => {
// const row = element.parentElement?.parentElement;
// if (row?.nodeName === 'TR') {
// row.setAttribute('data-chromatic', 'ignore');
// } else {
// throw new Error('the DOM structure changed, please update this test');
// }
// };
const addChromaticIgnore = async (element: HTMLElement) => {
const row = element.parentElement?.parentElement;
if (row?.nodeName === 'TR') {
row.setAttribute('data-chromatic', 'ignore');
} else {
throw new Error('the DOM structure changed, please update this test');
}
};

export const TsTypes: StoryObj = {
parameters: { component: TsTypesComponent },
Expand Down

0 comments on commit ac738ec

Please sign in to comment.