0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-31 22:51:25 -05:00

refactor(console): rename props name for table component (#4055)

This commit is contained in:
Xiao Yijun 2023-06-19 16:40:38 +08:00 committed by GitHub
parent b877309f99
commit f03e497327
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 11 deletions

View file

@ -27,8 +27,8 @@ export type Props<
isRowClickable?: (row: TFieldValues) => boolean;
rowClickHandler?: (row: TFieldValues) => void;
className?: string;
headerClassName?: string;
bodyClassName?: string;
headerTableClassName?: string;
bodyTableWrapperClassName?: string;
isLoading?: boolean;
pagination?: PaginationProps;
placeholder?: ReactNode;
@ -49,8 +49,8 @@ function Table<
rowClickHandler,
isRowClickable = () => Boolean(rowClickHandler),
className,
headerClassName,
bodyClassName,
headerTableClassName,
bodyTableWrapperClassName,
isLoading,
pagination,
placeholder,
@ -79,7 +79,7 @@ function Table<
className={classNames(
styles.headerTable,
filter && styles.hideTopBorderRadius,
headerClassName
headerTableClassName
)}
>
<thead>
@ -93,7 +93,11 @@ function Table<
</thead>
</table>
<OverlayScrollbar
className={classNames(styles.bodyTable, isEmpty && styles.empty, bodyClassName)}
className={classNames(
styles.bodyTable,
isEmpty && styles.empty,
bodyTableWrapperClassName
)}
>
<table>
<tbody>

View file

@ -179,8 +179,8 @@ function LanguageDetails() {
<Table
isRowHoverEffectDisabled
className={styles.content}
headerClassName={styles.tableWrapper}
bodyClassName={styles.tableWrapper}
headerTableClassName={styles.tableWrapper}
bodyTableWrapperClassName={styles.tableWrapper}
rowIndexKey="phraseKey"
rowGroups={translationEntries.map(([groupKey, value]) => ({
key: groupKey,

View file

@ -30,7 +30,7 @@
background-color: unset;
}
.bodyTableContainer {
.bodyTableWrapper {
background-color: unset;
padding-bottom: unset;

View file

@ -27,8 +27,8 @@ function DnsRecordsTable({ records }: Props) {
<Table
isRowHoverEffectDisabled
className={styles.table}
headerClassName={styles.header}
bodyClassName={styles.bodyTableContainer}
headerTableClassName={styles.header}
bodyTableWrapperClassName={styles.bodyTableWrapper}
rowGroups={[{ key: 'dnsRecords', data: records }]}
rowIndexKey="name"
isRowClickable={() => false}