Skip to content

Commit

Permalink
fix: fixed lint problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
soslayando committed Nov 26, 2023
1 parent 68fcc7d commit 29b2ee6
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 66 deletions.
5 changes: 1 addition & 4 deletions packages/table/src/core/HeaderCell/HeaderCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ export const HeaderCell: React.FC<HeaderCellProps> = ({
headerCellWidth,
offsetX,
}) => (
<StyledHeaderCell
headerCellWidth={headerCellWidth}
offsetX={offsetX}
>
<StyledHeaderCell headerCellWidth={headerCellWidth} offsetX={offsetX}>
<Typography.Heading size="h6" truncateLine={1}>
{colDef.headerName}
</Typography.Heading>
Expand Down
4 changes: 1 addition & 3 deletions packages/table/src/core/HeaderCell/StyledHeaderCell.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import * as React from 'react';
import styled, { css } from 'styled-components';
import { elevationMixin } from '@devoinc/genesys-ui';
import { getSizes } from '../utils';
import styled from 'styled-components';

interface StyledHeaderCellProps {
headerCellWidth: React.CSSProperties['width'];
Expand Down
1 change: 0 additions & 1 deletion packages/table/src/core/Row/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { VirtualItem, Virtualizer } from '@tanstack/react-virtual';
import { ColDef } from '../../declarations';
import { Cell } from '../Cell';
import { StyledTableRow, StyledTableRowProps } from './StyledTableRow';
import { getColDefByID } from '../utils';

interface RowProps extends StyledTableRowProps {
columnDefs: ColDef[];
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/core/Row/StyledTableRow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const StyledTableRow = styled.tr.attrs<StyledTableRowProps>(
&::after {
${pseudoElementMixin({})}
background: url(${`"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ctitle%3Erow_drag_drop%3C/title%3E%3Cpath d='M12.933 0h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 29.467h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 25.2h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 16.8h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 12.667h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 8.4h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 4.267h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 21.067h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 0h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 29.467h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 25.2h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 16.8h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 12.667h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 8.4h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 4.267h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 21.067h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3C/svg%3E"`})
background: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ctitle%3Erow_drag_drop%3C/title%3E%3Cpath d='M12.933 0h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 29.467h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 25.2h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 16.8h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 12.667h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 8.4h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 4.267h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M12.933 21.067h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 0h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 29.467h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 25.2h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 16.8h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 12.667h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 8.4h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 4.267h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3Cpath d='M16.533 21.067h2.533v2.533h-2.533v-2.533z'%3E%3C/path%3E%3C/svg%3E")
no-repeat;
background-clip: border-box;
top: 50%;
Expand Down
36 changes: 17 additions & 19 deletions packages/table/src/core/TableBody/TableBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,22 @@ export const TableBody: React.FC<TableBodyProps> = ({
$height={`${rowVirtualizer.getTotalSize()}px`}
$width={`${columnVirtualizer.getTotalSize()}px`}
>
{rowVirtualizer
.getVirtualItems()
.map((virtualRow: VirtualItem, index: number) => {
return (
<Row
key={'tb_' + virtualRow.key}
columnDefs={columnDefs}
columnVirtualizer={columnVirtualizer}
data={data[virtualRow.index]}
even={(virtualRow.index + 1) % 2 === 0}
styles={{
height: `${virtualRow.size}px`,
transform: `translateY(${virtualRow.start}px)`,
width: `${columnVirtualizer.getTotalSize()}px`,
position: 'absolute',
}}
/>
);
})}
{rowVirtualizer.getVirtualItems().map((virtualRow: VirtualItem) => {
return (
<Row
key={'tb_' + virtualRow.key}
columnDefs={columnDefs}
columnVirtualizer={columnVirtualizer}
data={data[virtualRow.index]}
even={(virtualRow.index + 1) % 2 === 0}
styles={{
height: `${virtualRow.size}px`,
transform: `translateY(${virtualRow.start}px)`,
width: `${columnVirtualizer.getTotalSize()}px`,
position: 'absolute',
}}
/>
);
})}
</StyledTableBody>
);
37 changes: 0 additions & 37 deletions packages/table/src/renderers/text/StyledText.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/table/src/renderers/text/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react';
import { StyledText } from './StyledText';
import { Typography } from '@devoinc/genesys-ui';
import { ColDef } from '../../declarations';

Expand Down

0 comments on commit 29b2ee6

Please sign in to comment.