remove default title on ContentHeaderTitle
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
@@ -30,6 +30,13 @@ describe('<ContentHeader/>', () => {
|
||||
rendered.getByText('Title');
|
||||
});
|
||||
|
||||
it('should render without title', async () => {
|
||||
const rendered = await renderInTestApp(
|
||||
<ContentHeader>content</ContentHeader>,
|
||||
);
|
||||
rendered.getByText('content');
|
||||
});
|
||||
|
||||
it('should render with titleComponent', async () => {
|
||||
const title = 'Custom title';
|
||||
const titleComponent = <h1>{title}</h1>;
|
||||
|
||||
@@ -73,10 +73,7 @@ type ContentHeaderTitleProps = {
|
||||
className?: string;
|
||||
};
|
||||
|
||||
const ContentHeaderTitle = ({
|
||||
title = 'Unknown page',
|
||||
className,
|
||||
}: ContentHeaderTitleProps) => (
|
||||
const ContentHeaderTitle = ({ title, className }: ContentHeaderTitleProps) => (
|
||||
<Typography
|
||||
variant="h4"
|
||||
component="h2"
|
||||
|
||||
Reference in New Issue
Block a user