Next.js template
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ErrorMessageComponent.jsx 350B

123456789101112131415
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import { Typography } from '@mui/material';
  4. const ErrorMessageComponent = ({ error }) => (
  5. <Typography variant="body1" color="error" my={2}>
  6. {error}
  7. </Typography>
  8. );
  9. ErrorMessageComponent.propTypes = {
  10. error: PropTypes.string.isRequired,
  11. };
  12. export default ErrorMessageComponent;