Skip to content

Commit

Permalink
fix: changes according to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fayez-baig committed Oct 12, 2020
1 parent 59334f9 commit 53b066f
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/components/Elements/Block/Block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { BlockProps, defaultProps } from './types';
import { getStyles } from '../../styles/getStyles';

const Block: React.SFC<BlockProps> = ({ children }) => {
const Block: React.FC<BlockProps> = ({ children }) => {
return <div className={getStyles(['block'])}>{children}</div>;
};

Expand Down
12 changes: 6 additions & 6 deletions src/components/Elements/Table/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React from 'react';
import { Story } from '@storybook/react/types-6-0';
import Table from './Table';
import { TableProps } from './types';
import Thead from './Thead';
import THead from './THead';
import TableHeading from './TableHeading';
import Tbody from './Tbody';
import TBody from './TBody';
import TableCell from './TableCell';
import TableRow from './TableRow';

Expand Down Expand Up @@ -42,13 +42,13 @@ export default {

const defaultTableTemplate: Story<TableProps> = args => (
<Table {...args}>
<Thead>
<THead>
<TableHeading>Row</TableHeading>
<TableHeading>Col</TableHeading>
<TableHeading>Width</TableHeading>
<TableHeading>Height</TableHeading>
</Thead>
<Tbody>
</THead>
<TBody>
<TableRow>
<TableCell>1</TableCell>
<TableCell>2</TableCell>
Expand All @@ -73,7 +73,7 @@ const defaultTableTemplate: Story<TableProps> = args => (
<TableCell>3</TableCell>
<TableCell>4</TableCell>
</TableRow>
</Tbody>
</TBody>
</Table>
);

Expand Down
2 changes: 1 addition & 1 deletion src/components/Elements/Table/TableCell.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { TableCellProps } from './types';

const TableCell: React.SFC<TableCellProps> = ({ children }) => {
const TableCell: React.FC<TableCellProps> = ({ children }) => {
return <td>{children}</td>;
};

Expand Down
6 changes: 3 additions & 3 deletions src/components/Elements/Table/Tbody.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { TbodyProps } from './types';
import { TBodyProps } from './types';

const Tbody: React.SFC<TbodyProps> = ({ children }) => {
const TBody: React.FC<TBodyProps> = ({ children }) => {
return <tbody>{children}</tbody>;
};

export default Tbody;
export default TBody;
6 changes: 3 additions & 3 deletions src/components/Elements/Table/Tfoot.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import { TfootProps } from './types';
import { TFootProps } from './types';

const Tfoot: React.SFC<TfootProps> = ({ children }) => {
const TFoot: React.FC<TFootProps> = ({ children }) => {
return (
<tfoot>
<tr>{children}</tr>
</tfoot>
);
};

export default Tfoot;
export default TFoot;
6 changes: 3 additions & 3 deletions src/components/Elements/Table/Thead.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import { TheadProps } from './types';
import { THeadProps } from './types';

const Thead: React.SFC<TheadProps> = ({ children }) => {
const THead: React.FC<THeadProps> = ({ children }) => {
return (
<thead>
<tr>{children}</tr>
</thead>
);
};

export default Thead;
export default THead;
6 changes: 3 additions & 3 deletions src/components/Elements/Table/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export interface TableProps {
isStriped?: boolean;
}

export interface TheadProps {
export interface THeadProps {
children?: ReactNode;
}

export interface TfootProps {
export interface TFootProps {
children?: ReactNode;
}

Expand All @@ -29,7 +29,7 @@ export interface TableCellProps {
children?: ReactNode;
}

export interface TbodyProps {
export interface TBodyProps {
children?: ReactNode;
}

Expand Down
7 changes: 3 additions & 4 deletions src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export { default as TagWrapper } from './Elements/Tag/TagWrapper';

//Table
export { default as Table } from './Elements/Table/Table';
export { default as Thead } from './Elements/Table/Thead';
export { default as Tfoot } from './Elements/Table/Tfoot';
export { default as Tbody } from './Elements/Table/Tbody';
export { default as THead } from './Elements/Table/THead';
export { default as TFoot } from './Elements/Table/TFoot';
export { default as TBody } from './Elements/Table/TBody';
export { default as TableRow } from './Elements/Table/TableRow';
export { default as TableHeading } from './Elements/Table/TableHeading';
export { default as TableCell } from './Elements/Table/TableCell';
Expand All @@ -30,7 +30,6 @@ export { default as TextArea } from './Form/TextArea/TextArea';
export { default as CheckBox } from './Form/CheckBox/CheckBox';
export { default as Select } from './Form/Select/Select';
export { default as Radio } from './Form/Radio/Radio';
export { default as LoadingWrapper } from './Form/LoadingWrapper/LoadingWrapper';

//Layout
export { default as Row } from './Layout/Grid/Row/Row';
Expand Down

0 comments on commit 53b066f

Please sign in to comment.