Skip to content

Commit

Permalink
FIX Eslint and Storybook errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Jun 13, 2023
1 parent bf1e295 commit de5860d
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,3 @@ export const Html5 = () => (
}}
/>
);

Html5.story = {
name: 'HTML5',
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,3 @@ export const Default = () => (
export const HtmlValue = () => (
<HtmlReadonlyField name="default" value={htmlValue} />
);

HtmlValue.story = {
name: 'HTML Value',
};
100 changes: 48 additions & 52 deletions client/src/components/Search/tests/Search-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,75 +24,71 @@ export default {
};

export const SimpleVanilla = () => (
<Search
id="SimpleVanillaSearch"
display="VISIBLE"
displayBehavior={'NONE'}
{...props}
/>
<Search
id="SimpleVanillaSearch"
display="VISIBLE"
displayBehavior={'NONE'}
{...props}
/>
);

export const WithFilters = () => (
<Search
id="SmallNotExpanded"
display="VISIBLE"
formSchemaUrl=""
filters={{}}
formData={{}}
placeholder={"Search 'Pages'"}
displayBehavior={'NONE'}
forceFilters
{...props}
/>
<Search
id="SmallNotExpanded"
display="VISIBLE"
formSchemaUrl=""
filters={{}}
formData={{}}
placeholder={"Search 'Pages'"}
displayBehavior={'NONE'}
forceFilters
{...props}
/>
);

export const Hideable = () => (
<Search
id="Large Hideable"
display="VISIBLE"
formSchemaUrl=""
forceFilters
filters={{}}
formData={{}}
placeholder="Search me"
displayBehavior={'HIDEABLE'}
{...props}
/>
<Search
id="Large Hideable"
display="VISIBLE"
formSchemaUrl=""
forceFilters
filters={{}}
formData={{}}
placeholder="Search me"
displayBehavior={'HIDEABLE'}
{...props}
/>
);

export const Toggeable = () => (
<Search
id="TOGGEABLE"
display="NONE"
displayBehavior="TOGGLABLE"
formSchemaUrl=""
formData={{}}
forceFilters
{...props}
/>
);

export const Wide = () => (
<div style={{ width: '800px' }}>
<Search
id="TOGGEABLE"
display="NONE"
id="WIDE"
display="VISIBLE"
displayBehavior="TOGGLABLE"
formSchemaUrl=""
formData={{}}
forceFilters
{...props}
/>
);

export const Wide = () => (
<div style={{ width: '800px' }}>
<Search
id="WIDE"
display="VISIBLE"
displayBehavior="TOGGLABLE"
formSchemaUrl=""
formData={{}}
forceFilters
{...props}
/>
</div>
</div>
);

export const ToggleButton = () => (
<div>
<SearchToggle />
<SearchToggle toggled />
</div>
<div>
<SearchToggle />
<SearchToggle toggled />
</div>
);

ToggleButton.story = {
name: 'Toggle button',
};
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,15 @@ export default {
};

export const EmptyDefault = () => (
<SingleSelectField
{...props}
data={{
hasEmptyDefault: true,
emptyString: 'Choose an option',
}}
/>
<SingleSelectField
{...props}
data={{
hasEmptyDefault: true,
emptyString: 'Choose an option',
}}
/>
);

EmptyDefault.story = {
name: 'Empty default',
};

export const Readonly = () => (
<SingleSelectField {...props} readOnly value="One" />
<SingleSelectField {...props} readOnly value="One" />
);
8 changes: 0 additions & 8 deletions client/src/components/Toolbar/tests/Toolbar-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ export const NoBackButton = () => (
<Toolbar showBackButton={f} onBackButtonClick={noop} />
);

NoBackButton.story = {
name: 'No back button',
};

export const BackButton = () => (
<Toolbar showBackButton={t} onBackButtonClick={noop} />
);

BackButton.story = {
name: 'Back button',
};
12 changes: 0 additions & 12 deletions client/src/components/UsedOnTable/tests/UsedOnTable-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,8 @@ export default {

export const LoadingState = () => <UsedOnTable loading />;

LoadingState.story = {
name: 'Loading state',
};

export const NoOwners = () => <UsedOnTable usedOn={[]} />;

NoOwners.story = {
name: 'No owners',
};

export const WithOwners = () => (
<UsedOnTable
usedOn={[
Expand Down Expand Up @@ -51,7 +43,3 @@ export const WithOwners = () => (
]}
/>
);

WithOwners.story = {
name: 'With owners',
};
14 changes: 5 additions & 9 deletions client/src/font/tests/Icons-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,9 @@ export default {
};

export const IconReference = () => (
<div>
<style>{styles}</style>
{/* eslint-disable-next-line react/no-danger */}
<div dangerouslySetInnerHTML={{ __html: mapping.outerHTML }} />
</div>
<div>
<style>{styles}</style>
{/* eslint-disable-next-line react/no-danger */}
<div dangerouslySetInnerHTML={{ __html: mapping.outerHTML }} />
</div>
);

IconReference.story = {
name: 'Icon reference',
};

0 comments on commit de5860d

Please sign in to comment.