From 4e115671ebb341d44f92f90a30936b91cbb31ec7 Mon Sep 17 00:00:00 2001 From: Sasitha Rajapaksha Date: Tue, 5 Sep 2023 14:31:34 +0800 Subject: [PATCH] [BOOKINGSG-4633][SR] Refactor code with PR comments --- src/data-table/data-table.styles.tsx | 6 ++---- src/data-table/data-table.tsx | 2 +- src/error-display/types.ts | 4 +++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/data-table/data-table.styles.tsx b/src/data-table/data-table.styles.tsx index 9d5ef4537..b9f355984 100644 --- a/src/data-table/data-table.styles.tsx +++ b/src/data-table/data-table.styles.tsx @@ -98,10 +98,10 @@ export const BodyRow = styled.tr` }}; border-top: 1px solid ${borderColor}; &:hover { - background-color: ${(props) => { + ${(props) => { if (!props.$isSelected && props.$isSelectable) { return css` - ${DesignToken.Table.Cell.Hover}; + background-color: ${DesignToken.Table.Cell.Hover}; `; } }}; @@ -113,8 +113,6 @@ export const BodyCell = styled.td` props.$isCheckbox ? "1.25rem 0.5rem 1.25rem 1.5rem" : "1.25rem 1rem"}; vertical-align: middle; color: ${fontColor}; - min-height: 2.625rem; - max-height: 5.75rem; `; export const BodyCellContent = styled(Text.Body)` diff --git a/src/data-table/data-table.tsx b/src/data-table/data-table.tsx index 73b721957..eb79ae2f0 100644 --- a/src/data-table/data-table.tsx +++ b/src/data-table/data-table.tsx @@ -193,7 +193,7 @@ export const DataTable = ({ {typeof cellData === "string" ? ( {cellData} ) : ( - { cellData } + cellData )} ); diff --git a/src/error-display/types.ts b/src/error-display/types.ts index 79e74d8d6..57ce2f551 100644 --- a/src/error-display/types.ts +++ b/src/error-display/types.ts @@ -1,3 +1,5 @@ +import { ButtonProps } from "../button"; + export type ErrorDisplayType = | "400" | "403" @@ -30,7 +32,7 @@ export interface ErrorDisplayAttributes { title?: string | JSX.Element | undefined; description?: string | JSX.Element | undefined; /** The action button displayed at the bottom of the Error Display */ - actionButton?: React.ButtonHTMLAttributes | undefined; + actionButton?: ButtonProps | undefined; additionalProps?: MaintenanceAdditionalAttributes | undefined; }