Projekt

Obecné

Profil

Stáhnout (496 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 align="center" variant="h6" fontWeight="400">
13
                {err}
14
            </Typography>
15
        ) : null}
16
    </Fragment>
17
)
18

    
19
export default ShowErrorIfPresent
(2-2/3)