Skip to content

Commit

Permalink
fix: number icon tests. lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
ifrost1 committed Jun 9, 2022
1 parent 9254765 commit cfd2e80
Show file tree
Hide file tree
Showing 11 changed files with 506 additions and 490 deletions.
8 changes: 4 additions & 4 deletions .storybook/pages/Cad/Cad.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ export const Cad = () => (
<Panel className="u-margin-bottom-lg" variant="squared">
<LayoutContainer>
<PageHeader
orientation="2up"
className="u-margin-bottom-none"
description={
<HorizontalStepper
Expand All @@ -278,6 +277,7 @@ export const Cad = () => (
></HorizontalStepper>
}
headingSize="title-sm"
orientation="2up"
right={
<ButtonGroup>
<Button>
Expand Down Expand Up @@ -470,21 +470,21 @@ export const Cad = () => (
/>
</CardWithNotification.Body>
</CardWithNotification>
<Grid variant="1-2-1up" className="u-margin-bottom-lg">
<Grid className="u-margin-bottom-lg" variant="1-2-1up">
<GridItem>
<TableCard
buttonContent="View all Cognitive Skills"
tableColumns={CognitiveSkillColumns}
tableRows={CognitiveSkillRows}
title="Cognitive skills coverage"
buttonContent="View all Cognitive Skills"
/>
</GridItem>
<GridItem>
<TableCard
buttonContent="View all Standards"
tableColumns={StandardsColumns}
tableRows={StandardsRows}
title="Standards coverage"
buttonContent="View all Standards"
/>
</GridItem>
</Grid>
Expand Down
10 changes: 4 additions & 6 deletions .storybook/recipes/NumberIconList/NumberIconList.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@

import React from 'react';
import { Story, Meta } from '@storybook/react';
import React from 'react';

import { NumberIconList, Props } from './NumberIconList';

export default {
title: 'Recipes/NumberIconList',
component: NumberIconList,
title: 'Recipes/NumberIconList',
component: NumberIconList,
} as Meta;

const Template: Story<Props> = (args) => <NumberIconList {...args} />;

export const Default = Template.bind({});
Default.args = {
};;
Default.args = {};
2 changes: 1 addition & 1 deletion .storybook/recipes/NumberIconList/NumberIconList.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ReactNode } from 'react';
import clsx from 'clsx';
import React, { ReactNode } from 'react';
import styles from './NumberIconList.module.css';

export interface Props {
Expand Down
2 changes: 1 addition & 1 deletion .storybook/recipes/NumberIconList/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { NumberIconList as default } from './NumberIconList'
export { NumberIconList as default } from './NumberIconList';
2 changes: 1 addition & 1 deletion .storybook/recipes/TableCard/TableCard.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Story, Meta } from '@storybook/react';
import React from 'react';

import { TableCard, Props } from './TableCard';

Expand Down
15 changes: 8 additions & 7 deletions .storybook/recipes/TableCard/TableCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ReactNode } from 'react';
import clsx from 'clsx';
import React, { ReactNode } from 'react';
import styles from './TableCard.module.css';

import {
Expand Down Expand Up @@ -66,12 +66,12 @@ export const TableCard = ({
return (
<Card className={componentClassName} {...other}>
<CardBody>
<Heading className="u-margin-bottom-md" as="h2" size="title-sm">
<Heading as="h2" className="u-margin-bottom-md" size="title-sm">
{title}
</Heading>
<Table
className={styles['standards-coverage__table']}
caption="Standards coverage"
className={styles['standards-coverage__table']}
hideCaption={true}
>
<TableHeader>
Expand All @@ -80,7 +80,7 @@ export const TableCard = ({
return (
<TableHeaderCell
className={styles['standards-coverage__table-header-cell']}
key={'table-header-row-' + index}
key={'table-header-cell-' + index}
>
{item.title}
</TableHeaderCell>
Expand All @@ -91,18 +91,19 @@ export const TableCard = ({
<TableBody>
{tableRows.map((item, index) => {
return (
<TableRow>
<TableRow key={`table-row-${index}`}>
<TableHeaderCell>{item.value1}</TableHeaderCell>
<TableCell>
<NumberIconList>
{item.projects.map((item, index) => {
return (
<NumberIcon
size="sm"
aria-label={item.ariaLabel}
number={index + 1}
incomplete={!item.complete}
key={`number-icon-${index}`}
number={index + 1}
numberIconTitle={`incomplete step ${index + 1}`}
size="sm"
/>
);
})}
Expand Down
2 changes: 1 addition & 1 deletion src/components/HorizontalStep/HorizontalStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export const HorizontalStep = ({
) : (
<NumberIcon
aria-label={`current step ${stepNumber} ${text}`}
incomplete={variant !== 'active'}
number={stepNumber}
numberIconTitle={`incomplete step ${stepNumber} ${text}`}
incomplete={variant !== 'active'}
/>
);

Expand Down
Loading

0 comments on commit cfd2e80

Please sign in to comment.