-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[List] Migrate ListItemAvatar to emotion (#24656)
- Loading branch information
Showing
9 changed files
with
98 additions
and
36 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
17 changes: 5 additions & 12 deletions
17
packages/material-ui/src/ListItemAvatar/ListItemAvatar.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,29 +1,22 @@ | ||
import * as React from 'react'; | ||
import { getClasses, createMount, describeConformance } from 'test/utils'; | ||
import { createMount, describeConformanceV5 } from 'test/utils'; | ||
import ListItemAvatar from './ListItemAvatar'; | ||
import classes from './listItemAvatarClasses'; | ||
|
||
describe('<ListItemAvatar />', () => { | ||
const mount = createMount(); | ||
let classes; | ||
|
||
before(() => { | ||
classes = getClasses( | ||
<ListItemAvatar> | ||
<div /> | ||
</ListItemAvatar>, | ||
); | ||
}); | ||
|
||
describeConformance( | ||
describeConformanceV5( | ||
<ListItemAvatar> | ||
<div /> | ||
</ListItemAvatar>, | ||
() => ({ | ||
classes, | ||
inheritComponent: 'div', | ||
mount, | ||
muiName: 'MuiListItemAvatar', | ||
refInstanceof: window.HTMLDivElement, | ||
skip: ['componentProp'], | ||
skip: ['componentProp', 'componentsProp', 'themeVariants'], | ||
}), | ||
); | ||
}); |
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 './ListItemAvatar'; | ||
export * from './ListItemAvatar'; | ||
|
||
export { default as listItemAvatarClasses } from './listItemAvatarClasses'; | ||
export * from './listItemAvatarClasses'; |
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 './ListItemAvatar'; | ||
|
||
export { default as listItemAvatarClasses } from './listItemAvatarClasses'; | ||
export * from './listItemAvatarClasses'; |
10 changes: 10 additions & 0 deletions
10
packages/material-ui/src/ListItemAvatar/listItemAvatarClasses.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 ListItemAvatarClasses { | ||
root: string; | ||
alignItemsFlexStart: string; | ||
} | ||
|
||
declare const listItemAvatarClasses: ListItemAvatarClasses; | ||
|
||
export function getListItemAvatarUtilityClass(slot: string): string; | ||
|
||
export default listItemAvatarClasses; |
12 changes: 12 additions & 0 deletions
12
packages/material-ui/src/ListItemAvatar/listItemAvatarClasses.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,12 @@ | ||
import { generateUtilityClass, generateUtilityClasses } from '@material-ui/unstyled'; | ||
|
||
export function getListItemAvatarUtilityClass(slot) { | ||
return generateUtilityClass('MuiListItemAvatar', slot); | ||
} | ||
|
||
const listItemAvatarClasses = generateUtilityClasses('MuiListItemAvatar', [ | ||
'root', | ||
'alignItemsFlexStart', | ||
]); | ||
|
||
export default listItemAvatarClasses; |