Skip to content

Commit

Permalink
Olivier's fix for titlebar below image
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrookes committed Sep 4, 2020
1 parent b0d8f11 commit 0e6b5a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 23 deletions.
10 changes: 0 additions & 10 deletions docs/src/pages/components/image-list/TitlebarBelowImageList.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { makeStyles } from '@material-ui/core/styles';
import ImageList from '@material-ui/core/ImageList';
import ImageListItem from '@material-ui/core/ImageListItem';
import ImageListItemBar from '@material-ui/core/ImageListItemBar';
import IconButton from '@material-ui/core/IconButton';
import InfoIcon from '@material-ui/icons/Info';
import itemData from './itemData';

const useStyles = makeStyles({
Expand Down Expand Up @@ -43,14 +41,6 @@ export default function TitlebarBelowImageList() {
<ImageListItemBar
title={item.title}
subtitle={<span>by: {item.author}</span>}
actionIcon={
<IconButton
aria-label={`info about ${item.title}`}
className={classes.icon}
>
<InfoIcon />
</IconButton>
}
position="below"
/>
</ImageListItem>
Expand Down
10 changes: 0 additions & 10 deletions docs/src/pages/components/image-list/TitlebarBelowImageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { makeStyles } from '@material-ui/core/styles';
import ImageList from '@material-ui/core/ImageList';
import ImageListItem from '@material-ui/core/ImageListItem';
import ImageListItemBar from '@material-ui/core/ImageListItemBar';
import IconButton from '@material-ui/core/IconButton';
import InfoIcon from '@material-ui/icons/Info';
import itemData from './itemData';

const useStyles = makeStyles({
Expand Down Expand Up @@ -43,14 +41,6 @@ export default function TitlebarBelowImageList() {
<ImageListItemBar
title={item.title}
subtitle={<span>by: {item.author}</span>}
actionIcon={
<IconButton
aria-label={`info about ${item.title}`}
className={classes.icon}
>
<InfoIcon />
</IconButton>
}
position="below"
/>
</ImageListItem>
Expand Down
10 changes: 7 additions & 3 deletions packages/material-ui/src/ImageListItem/ImageListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ export const styles = {
root: {
position: 'relative',
lineHeight: 0, // Fix masonry item spacing
// display: 'flex',
// flexDirection: 'column',
},
/* Styles applied to an `img` element to ensure it covers the item. */
img: {
objectFit: 'cover',
width: '100%',
height: '100%',
// height: '100%',
flexGrow: 1,
},
/* Styles applied to the root element if `variant="standard"`. */
standard: {
display: 'flex', // For titlebar under list item
flexDirection: 'column', // For titlebar under list item
},
/* Styles applied to the root element if `variant="woven"`. */
woven: {
Expand Down

0 comments on commit 0e6b5a3

Please sign in to comment.