Skip to content

Commit

Permalink
[BOOKINGSG-4633][SR] Refactor code with PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SasithaRajapakasha committed Sep 5, 2023
1 parent d6cbe7b commit 4e11567
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/data-table/data-table.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ export const BodyRow = styled.tr<BodyRowProps>`
}};
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};
`;
}
}};
Expand All @@ -113,8 +113,6 @@ export const BodyCell = styled.td<BodyCellProps>`
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)`
Expand Down
2 changes: 1 addition & 1 deletion src/data-table/data-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const DataTable = ({
{typeof cellData === "string" ? (
<BodyCellContent>{cellData}</BodyCellContent>
) : (
{ cellData }
cellData
)}
</BodyCell>
);
Expand Down
4 changes: 3 additions & 1 deletion src/error-display/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ButtonProps } from "../button";

export type ErrorDisplayType =
| "400"
| "403"
Expand Down Expand Up @@ -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<HTMLButtonElement> | undefined;
actionButton?: ButtonProps | undefined;
additionalProps?: MaintenanceAdditionalAttributes | undefined;
}

Expand Down

0 comments on commit 4e11567

Please sign in to comment.