Skip to content

Commit 16e497a

Browse files
committed
rm
1 parent d748490 commit 16e497a

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

src/Cell/index.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,10 @@ function Cell<RecordType>(props: CellProps<RecordType>) {
125125

126126
const cellPrefixCls = `${prefixCls}-cell`;
127127

128-
const {
129-
allColumnsFixedLeft,
130-
rowHoverable,
131-
classNames = {},
132-
styles = {},
133-
} = useContext(TableContext, ['allColumnsFixedLeft', 'rowHoverable', 'classNames', 'styles']);
128+
const { allColumnsFixedLeft, rowHoverable } = useContext(TableContext, [
129+
'allColumnsFixedLeft',
130+
'rowHoverable',
131+
]);
134132

135133
// ====================== Value =======================
136134
const [childNode, legacyCellProps] = useCellRender(
@@ -219,7 +217,6 @@ function Cell<RecordType>(props: CellProps<RecordType>) {
219217
// >>>>> ClassName
220218
const mergedClassName = cls(
221219
cellPrefixCls,
222-
classNames.cell,
223220
className,
224221
{
225222
// Fixed
@@ -255,7 +252,6 @@ function Cell<RecordType>(props: CellProps<RecordType>) {
255252
...fixedStyle,
256253
...alignStyle,
257254
...additionalProps.style,
258-
...styles.cell,
259255
...style,
260256
};
261257

src/Table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const EMPTY_DATA = [];
8585
// Used for customize scroll
8686
const EMPTY_SCROLL_TARGET = {};
8787

88-
export type SemanticName = 'section' | 'title' | 'footer' | 'content' | 'cell';
88+
export type SemanticName = 'section' | 'title' | 'footer' | 'content';
8989
export type ComponentsSemantic = 'wrapper' | 'cell' | 'row';
9090
export interface TableProps<RecordType = any>
9191
extends Omit<LegacyExpandableProps<RecordType>, 'showExpandColumn'> {

tests/semantic.spec.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ describe('support classNames and styles', () => {
5555
title: 'test-title',
5656
footer: 'test-footer',
5757
content: 'test-content',
58-
cell: 'test-cell',
5958
body: {
6059
wrapper: 'test-body-wrapper',
6160
cell: 'test-body-cell',
@@ -72,7 +71,6 @@ describe('support classNames and styles', () => {
7271
title: { background: 'green' },
7372
footer: { background: 'pink' },
7473
content: { background: 'purple' },
75-
cell: { fontSize: '19px' },
7674
body: {
7775
wrapper: { background: 'cyan' },
7876
cell: { background: 'lime' },
@@ -91,7 +89,6 @@ describe('support classNames and styles', () => {
9189
const title = container.querySelector('.rc-table-title');
9290
const footer = container.querySelector('.rc-table-footer');
9391
const content = container.querySelector('.rc-table-content');
94-
const cell = container.querySelector('.rc-table-cell');
9592
const headerWrapper = container.querySelector('.rc-table-thead');
9693
const headerCell = container.querySelector('.rc-table-cell');
9794
const headerRow = container.querySelector('tr');
@@ -106,8 +103,6 @@ describe('support classNames and styles', () => {
106103
expect(footer).toHaveStyle(testStyles.footer);
107104
expect(content).toHaveClass(testClassNames.content);
108105
expect(content).toHaveStyle(testStyles.content);
109-
expect(cell).toHaveClass(testClassNames.cell);
110-
expect(cell).toHaveStyle({ fontSize: testStyles.cell.fontSize });
111106

112107
expect(headerWrapper).toHaveClass(testClassNames.header.wrapper);
113108
expect(headerWrapper).toHaveStyle(testStyles.header.wrapper);

0 commit comments

Comments
 (0)