Skip to content

Commit

Permalink
fix wrong character
Browse files Browse the repository at this point in the history
  • Loading branch information
ASafaeirad committed Jan 8, 2024
1 parent 8a01734 commit c577c93
Showing 1 changed file with 32 additions and 35 deletions.
67 changes: 32 additions & 35 deletions libs/design/TableSkeleton/TableSkeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,40 @@ import { TableCell } from '../Table/TableCell';
import { TableRow } from '../Table/TableRow';

interface Props {
row: number
cell: number;
row: number;
cell: number;
}

export const TableSkeleton = ({ row, cell}: Props) => {
const skeletonRows = Array.from(
{ length: row },
(_, rowIndex) => (
<TableRow key={`skeleton-row-${rowIndex}`}>
{Array.from({ length: cell }, (_, cellIndex) => (
<TableCell key={`skeleton-cell-${cellIndex}`}>
{cellIndex === 0 ? (
<svg
width="40"
height="10"
viewBox="0 0 40 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="40" height="10" rx="5" fill="#DEE2E6" />
</svg>
) : (
<svg
width="130"
height="10"
viewBox="0 0 130 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="130" height="10" rx="5" fill="#DEE2E6" />
</svg>
)}
</TableCell>
))}
</TableRow>
),
);
export const TableSkeleton = ({ row, cell }: Props) => {
const skeletonRows = Array.from({ length: row }, (_, rowIndex) => (
<TableRow key={`skeleton-row-${rowIndex}`}>
{Array.from({ length: cell }, (_, cellIndex) => (
<TableCell key={`skeleton-cell-${cellIndex}`}>
{cellIndex === 0 ? (
<svg
width="40"
height="10"
viewBox="0 0 40 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="40" height="10" rx="5" fill="#DEE2E6" />
</svg>
) : (
<svg
width="130"
height="10"
viewBox="0 0 130 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="130" height="10" rx="5" fill="#DEE2E6" />
</svg>
)}
</TableCell>
))}
</TableRow>
));

return skeletonRows;
};

0 comments on commit c577c93

Please sign in to comment.