Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/src/pages/components/skeleton/Facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ function Media(props) {
</IconButton>
)
}
title={loading ? <Skeleton height={6} width="80%" /> : 'Ted'}
subheader={loading ? <Skeleton height={6} width="40%" /> : '5 hours ago'}
title={loading ? <Skeleton height={10} width="80%" style={{ marginBottom: 6 }} /> : 'Ted'}
subheader={loading ? <Skeleton height={10} width="40%" /> : '5 hours ago'}
/>
{loading ? (
<Skeleton variant="rect" className={classes.media} />
Expand All @@ -61,8 +61,8 @@ function Media(props) {
<CardContent>
{loading ? (
<React.Fragment>
<Skeleton height={6} />
<Skeleton height={6} width="80%" />
<Skeleton height={10} style={{ marginBottom: 6 }} />
<Skeleton height={10} width="80%" />
</React.Fragment>
) : (
<Typography variant="body2" color="textSecondary" component="p">
Expand Down
8 changes: 4 additions & 4 deletions docs/src/pages/components/skeleton/Facebook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ function Media(props: MediaProps) {
</IconButton>
)
}
title={loading ? <Skeleton height={6} width="80%" /> : 'Ted'}
subheader={loading ? <Skeleton height={6} width="40%" /> : '5 hours ago'}
title={loading ? <Skeleton height={10} width="80%" style={{ marginBottom: 6 }} /> : 'Ted'}
subheader={loading ? <Skeleton height={10} width="40%" /> : '5 hours ago'}
/>
{loading ? (
<Skeleton variant="rect" className={classes.media} />
Expand All @@ -65,8 +65,8 @@ function Media(props: MediaProps) {
<CardContent>
{loading ? (
<React.Fragment>
<Skeleton height={6} />
<Skeleton height={6} width="80%" />
<Skeleton height={10} style={{ marginBottom: 6 }} />
<Skeleton height={10} width="80%" />
</React.Fragment>
) : (
<Typography variant="body2" color="textSecondary" component="p">
Expand Down
6 changes: 3 additions & 3 deletions docs/src/pages/components/skeleton/YouTube.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function Media(props) {
)}

{item ? (
<Box paddingRight={2}>
<Box pr={2}>
<Typography gutterBottom variant="body2">
{item.title}
</Typography>
Expand All @@ -59,10 +59,10 @@ function Media(props) {
</Typography>
</Box>
) : (
<React.Fragment>
<Box pt={0.5}>
<Skeleton />
<Skeleton width="60%" />
</React.Fragment>
</Box>
)}
</Box>
))}
Expand Down
6 changes: 3 additions & 3 deletions docs/src/pages/components/skeleton/YouTube.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function Media(props: MediaProps) {
<Skeleton variant="rect" width={210} height={118} />
)}
{item ? (
<Box paddingRight={2}>
<Box pr={2}>
<Typography gutterBottom variant="body2">
{item.title}
</Typography>
Expand All @@ -61,10 +61,10 @@ function Media(props: MediaProps) {
</Typography>
</Box>
) : (
<React.Fragment>
<Box pt={0.5}>
<Skeleton />
<Skeleton width="60%" />
</React.Fragment>
</Box>
)}
</Box>
))}
Expand Down
11 changes: 9 additions & 2 deletions packages/material-ui-lab/src/Skeleton/Skeleton.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@ export const styles = theme => ({
},
/* Styles applied to the root element if `variant="text"`. */
text: {
marginTop: '0.8em',
marginBottom: '0.8em',
marginTop: 0,
marginBottom: 0,
height: 'auto',
transformOrigin: '0 65%',
transform: 'translateZ(0) scale(1, 0.65)',
borderRadius: theme.shape.borderRadius,
textIndent: -999,
'&:empty:before': {
content: '"&nbsp;"',
},
},
/* Styles applied to the root element if `variant="rect"`. */
rect: {},
Expand Down