Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(blade): remove backgroundColor prop from table #1984

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading