import PropTypes from 'prop-types'; import { Link } from '../../models/link'; import { Link as RouterLink } from 'react-router-dom'; import { Button } from '@mui/material'; interface Props { action?: Link; heading: string; nav?: Link[]; } export const PageHeading = (props: Props) => { const { action, heading, nav } = props; return (

{heading}

{action && ( )} {nav ? ( ) : null}
); }; PageHeading.propTypes = { action: PropTypes.object, heading: PropTypes.string.isRequired, nav: PropTypes.array, };