-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Dialog] Migrate DialogActions to emotion (#24613)
- Loading branch information
Showing
9 changed files
with
98 additions
and
30 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
14 changes: 6 additions & 8 deletions
14
packages/material-ui/src/DialogActions/DialogActions.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,18 @@ | ||
import * as React from 'react'; | ||
import { getClasses, createMount, describeConformance } from 'test/utils'; | ||
import { createMount, describeConformanceV5 } from 'test/utils'; | ||
import DialogActions from './DialogActions'; | ||
import classes from './dialogActionsClasses'; | ||
|
||
describe('<DialogActions />', () => { | ||
const mount = createMount(); | ||
let classes; | ||
|
||
before(() => { | ||
classes = getClasses(<DialogActions />); | ||
}); | ||
|
||
describeConformance(<DialogActions />, () => ({ | ||
describeConformanceV5(<DialogActions />, () => ({ | ||
classes, | ||
inheritComponent: 'div', | ||
mount, | ||
refInstanceof: window.HTMLDivElement, | ||
skip: ['componentProp'], | ||
muiName: 'MuiDialogActions', | ||
testVariantProps: { disableSpacing: true }, | ||
skip: ['componentProp', 'componentsProp'], | ||
})); | ||
}); |
10 changes: 10 additions & 0 deletions
10
packages/material-ui/src/DialogActions/dialogActionsClasses.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,10 @@ | ||
export interface DialogActionsClasses { | ||
root: string; | ||
spacing: string; | ||
} | ||
|
||
declare const dialogActionsClasses: DialogActionsClasses; | ||
|
||
export function getDialogActionsUtilityClass(slot: string): string; | ||
|
||
export default dialogActionsClasses; |
9 changes: 9 additions & 0 deletions
9
packages/material-ui/src/DialogActions/dialogActionsClasses.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 getDialogActionsUtilityClass(slot) { | ||
return generateUtilityClass('MuiDialogActions', slot); | ||
} | ||
|
||
const dialogActionsClasses = generateUtilityClasses('MuiDialogActions', ['root', 'spacing']); | ||
|
||
export default dialogActionsClasses; |
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,4 @@ | ||
export { default } from './DialogActions'; | ||
export * from './DialogActions'; | ||
export { default as dialogActionsClasses } from './dialogActionsClasses'; | ||
export * from './dialogActionsClasses'; |
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,3 @@ | ||
export { default } from './DialogActions'; | ||
export { default as dialogActionsClasses } from './dialogActionsClasses'; | ||
export * from './dialogActionsClasses'; |