forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Table] Migrate TableContainer to emotion (mui#24666)
- Loading branch information
Showing
9 changed files
with
93 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 6 additions & 7 deletions
13
packages/material-ui/src/TableContainer/TableContainer.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
import * as React from 'react'; | ||
import { getClasses, createMount, describeConformance } from 'test/utils'; | ||
import { createMount, describeConformanceV5 } from 'test/utils'; | ||
import TableContainer from './TableContainer'; | ||
import classes from './tableContainerClasses'; | ||
|
||
describe('<TableContainer />', () => { | ||
const mount = createMount(); | ||
let classes; | ||
|
||
before(() => { | ||
classes = getClasses(<TableContainer />); | ||
}); | ||
|
||
describeConformance(<TableContainer />, () => ({ | ||
describeConformanceV5(<TableContainer />, () => ({ | ||
classes, | ||
inheritComponent: 'div', | ||
mount, | ||
muiName: 'MuiTableContainer', | ||
testVariantProps: { variant: 'foo' }, | ||
refInstanceof: window.HTMLDivElement, | ||
testComponentPropWith: 'span', | ||
skip: ['componentsProp'], | ||
})); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
export { default } from './TableContainer'; | ||
export * from './TableContainer'; | ||
|
||
export { default as tableContainerClasses } from './tableContainerClasses'; | ||
export * from './tableContainerClasses'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
export { default } from './TableContainer'; | ||
|
||
export { default as tableContainerClasses } from './tableContainerClasses'; | ||
export * from './tableContainerClasses'; |
9 changes: 9 additions & 0 deletions
9
packages/material-ui/src/TableContainer/tableContainerClasses.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export interface TableContainerClasses { | ||
root: string; | ||
} | ||
|
||
declare const tableContainerClasses: TableContainerClasses; | ||
|
||
export function getTableContainerUtilityClass(slot: string): string; | ||
|
||
export default tableContainerClasses; |
9 changes: 9 additions & 0 deletions
9
packages/material-ui/src/TableContainer/tableContainerClasses.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { generateUtilityClass, generateUtilityClasses } from '@material-ui/unstyled'; | ||
|
||
export function getTableContainerUtilityClass(slot) { | ||
return generateUtilityClass('MuiTableContainer', slot); | ||
} | ||
|
||
const tableContainerClasses = generateUtilityClasses('MuiTableContainer', ['root']); | ||
|
||
export default tableContainerClasses; |