Files
react-test/docs/data/material/components/skeleton/SkeletonTypography.js
how2ice 005cf56baf
Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
init project
2025-12-12 14:26:25 +09:00

38 lines
828 B
JavaScript

import Typography from '@mui/material/Typography';
import PropTypes from 'prop-types';
import Skeleton from '@mui/material/Skeleton';
import Grid from '@mui/material/Grid';
const variants = ['h1', 'h3', 'body1', 'caption'];
function TypographyDemo(props) {
const { loading = false } = props;
return (
<div>
{variants.map((variant) => (
<Typography component="div" key={variant} variant={variant}>
{loading ? <Skeleton /> : variant}
</Typography>
))}
</div>
);
}
TypographyDemo.propTypes = {
loading: PropTypes.bool,
};
export default function SkeletonTypography() {
return (
<Grid container spacing={8}>
<Grid size="grow">
<TypographyDemo loading />
</Grid>
<Grid size="grow">
<TypographyDemo />
</Grid>
</Grid>
);
}