import {
Alert,
Box,
Typography,
type AlertProps,
type TypographyProps,
} from '@mui/material'
interface NoDataAlertProps {
title?: string
body?: string
severity?: AlertProps['severity']
}
export function NoDataAlert({
title = 'No data available',
body = 'There are no results for the combination of filters applied to your data. Try tweaking your filters, or zoom and pan the map to adjust the Map View.',
severity,
}: NoDataAlertProps) {
if (severity) {
return (
{body}
)
}
return (
{title && {title}}
{body}
)
}
// Aux
interface AlertBodyProps {
color?: TypographyProps['color']
children: React.ReactNode
}
function AlertBody({ color, children }: AlertBodyProps) {
if (children) {
return (
{children}
)
}
return
}