From 49c81efa667fb7e53f82fa18aa26d28d88abe616 Mon Sep 17 00:00:00 2001 From: Bruno Henriques Date: Tue, 3 Dec 2024 18:54:31 +0000 Subject: [PATCH] fix(TableSection): border-radius --- .../cli/src/templates/DetailsView/Table.tsx | 78 ++++++++++--------- .../TableSection/CompleteTableSection.tsx | 66 +++++++++------- .../src/TableSection/TableSection.styles.tsx | 4 + 3 files changed, 81 insertions(+), 67 deletions(-) diff --git a/packages/cli/src/templates/DetailsView/Table.tsx b/packages/cli/src/templates/DetailsView/Table.tsx index bb4aa74c11..6aa110bb40 100644 --- a/packages/cli/src/templates/DetailsView/Table.tsx +++ b/packages/cli/src/templates/DetailsView/Table.tsx @@ -9,6 +9,7 @@ import { HvTableHead, HvTableHeader, HvTableRow, + HvTableSection, useHvData, useHvPagination, } from "@hitachivantara/uikit-react-core"; @@ -59,42 +60,45 @@ export const Table = ({ modelId }: TableProps) => { }, [instance.state]); return ( - + + + ); }; diff --git a/packages/core/src/Table/stories/TableSection/CompleteTableSection.tsx b/packages/core/src/Table/stories/TableSection/CompleteTableSection.tsx index b88fc1dc6c..528ab86224 100644 --- a/packages/core/src/Table/stories/TableSection/CompleteTableSection.tsx +++ b/packages/core/src/Table/stories/TableSection/CompleteTableSection.tsx @@ -2,6 +2,7 @@ import { useCallback, useMemo, useState } from "react"; import { HvActionGeneric, HvBulkActions, + HvLoadingContainer, HvPagination, HvTable, HvTableBody, @@ -113,36 +114,41 @@ export const CompleteTableSection = () => { { id: "preview", label: "Preview", icon: }, ]} /> - - - - {headerGroups.map((headerGroup) => ( - - {headerGroup.headers.map((col) => ( - - {col.render("Header")} - - ))} - - ))} - - - {pageSize && [...Array(pageSize).keys()].map(renderTableRow)} - - - - {page?.length ? ( - - ) : undefined} + ); }; diff --git a/packages/core/src/TableSection/TableSection.styles.tsx b/packages/core/src/TableSection/TableSection.styles.tsx index 3d994a5a02..dede4a5a44 100644 --- a/packages/core/src/TableSection/TableSection.styles.tsx +++ b/packages/core/src/TableSection/TableSection.styles.tsx @@ -38,6 +38,8 @@ export const { staticClasses, useClasses } = createClasses("HvTableSection", { [`& .${tableContainerClasses.root}`]: { paddingBottom: 0, + borderTopLeftRadius: "inherit", + borderTopRightRadius: "inherit", }, [`& .${tableHeaderClasses.head}`]: { @@ -82,6 +84,8 @@ export const { staticClasses, useClasses } = createClasses("HvTableSection", { backgroundColor: theme.colors.atmo2, padding: theme.space.xs, borderTop: `1px solid ${theme.colors.atmo3}`, + borderBottomLeftRadius: "inherit", + borderBottomRightRadius: "inherit", }, [`& .${paginationClasses.pageSizeOptions}`]: {