components.wm.components.TitleComponent.tsx Maven / Gradle / Ivy
import React from 'react';
import { Box, Divider, Typography } from '@mui/material';
import { usePaneContext } from '../hooks/usePaneContext';
export const TitleComponent = () => {
const { title, subtitle } = usePaneContext();
if (title != undefined) {
return (
{typeof title === 'function' ? title() : title}
{subtitle != undefined
? theme.palette.grey[700]}}>{typeof subtitle === 'function' ? subtitle() : subtitle}
: null}
);
} else return null;
};