Skip to content

Commit

Permalink
chore(blade): remove backgroundColor prop from table (#1984)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraghazra authored Jan 18, 2024
1 parent cc209df commit c96858b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion packages/blade/src/components/Table/Table.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
checkboxCellWidth,
firstColumnStickyHeaderFooterZIndex,
refreshWrapperZIndex,
tableBackgroundColor,
tablePagination,
} from './tokens';
import type { TableProps, TableNode, Identifier } from './types';
Expand Down Expand Up @@ -124,7 +125,6 @@ const _Table = <Item,>({
gridTemplateColumns,
isLoading = false,
isRefreshing = false,
backgroundColor = 'surface.background.gray.intense',
...styledProps
}: TableProps<Item>): React.ReactElement => {
const { theme } = useTheme();
Expand All @@ -133,6 +133,7 @@ const _Table = <Item,>({
const [totalItems, setTotalItems] = React.useState(data.nodes.length || 0);
// Need to make header is sticky if first column is sticky otherwise the first header cell will not be sticky
const shouldHeaderBeSticky = isHeaderSticky ?? isFirstColumnSticky;
const backgroundColor = tableBackgroundColor;

const {
isEntering: isRefreshSpinnerEntering,
Expand Down
2 changes: 2 additions & 0 deletions packages/blade/src/components/Table/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const refreshWrapperZIndex = 3;

const checkboxCellWidth = size['44'];

const tableBackgroundColor = 'surface.background.gray.intense';
const tableHeader = {
paddingTop: 'spacing.5',
paddingBottom: 'spacing.5',
Expand Down Expand Up @@ -126,6 +127,7 @@ export {
tableToolbar,
tablePagination,
refreshWrapperZIndex,
tableBackgroundColor,
firstColumnStickyHeaderFooterZIndex,
checkboxCellWidth,
};
4 changes: 0 additions & 4 deletions packages/blade/src/components/Table/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ type TableProps<Item> = {
* The default value is `repeat(${columnCount},minmax(100px, 1fr))`.
**/
gridTemplateColumns?: string;
/**
* background color of the table
**/
backgroundColor?: TableBackgroundColors;
/**
* The isLoading prop determines whether the table is loading or not.
* The default value is `false`.
Expand Down

0 comments on commit c96858b

Please sign in to comment.