Projekt

Obecné

Profil

Stáhnout (524 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
import { Typography } from '@mui/material'
2
import { Fragment, FunctionComponent } from 'react'
3

    
4
export interface ShowErrorProps {
5
    err?: string
6
}
7

    
8
// Utility component for showing error messages
9
const ShowErrorIfPresent: FunctionComponent<ShowErrorProps> = ({ err }) => (
10
    <Fragment>
11
        {err ? (
12
            <Typography sx={{mb: 1}} align="center" variant="h6" color="error" fontWeight="bold">
13
                {err}
14
            </Typography>
15
        ) : null}
16
    </Fragment>
17
)
18

    
19
export default ShowErrorIfPresent
(3-3/4)