-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
13 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,4 +85,4 @@ export const Table = styled(AntdTable)` | |
color: var(--disabled-color); | ||
} | ||
} | ||
` as typeof AntdTable; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import { TableProps } from 'antd'; | ||
import type { ComponentProps, FC } from 'react'; | ||
import { Table } from 'antd'; | ||
import * as S from './BaseTable.styles'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
type AnyRecord = Record<PropertyKey, any>; | ||
|
||
export type BaseTableProps<T extends AnyRecord> = TableProps<T>; | ||
export type BaseTableProps = ComponentProps<typeof Table<any>>; | ||
|
||
// TODO make generic! | ||
export const BaseTable = <T extends AnyRecord>(props: BaseTableProps<T>): React.JSX.Element => { | ||
export const BaseTable: FC<BaseTableProps> = (props) => { | ||
return <S.Table {...props} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters