add headingLevel to Title for ExtensionListView
@@ -6,7 +6,7 @@ import {
EmptyStateVariant,
Text,
Title,
- Tooltip
+ Tooltip,
} from '@patternfly/react-core';
import { AddCircleOIcon } from '@patternfly/react-icons';
import * as H from '@syndesis/history';
@@ -26,8 +26,8 @@ export interface IExtensionListViewProps extends IListViewToolbarProps {
linkImportExtension: H.LocationDescriptor;
}
-export const ExtensionListView: React.FunctionComponent<IExtensionListViewProps> = (
- {
+export const ExtensionListView: React.FunctionComponent<IExtensionListViewProps> =
+ ({
children,
i18nDescription,
i18nEmptyStateInfo,
@@ -39,20 +39,25 @@ export const ExtensionListView: React.FunctionComponent<IExtensionListViewProps>
i18nTitle,
linkImportExtension,
...rest
- }
-) => {
+ }) => {
return (
<PageSection>
<ListViewToolbar {...rest}>
<div className={'form-group'}>
- <ButtonLink data-testid={'extension-list-view-import-button'}
+ <ButtonLink
+ data-testid={'extension-list-view-import-button'}
href={linkImportExtension}
- as={'primary'}>
+ as={'primary'}
+ >
{i18nLinkImportExtension}
</ButtonLink>
</div>
</ListViewToolbar>
- {i18nTitle !== '' && <Title size={'lg'}>{i18nTitle}</Title>}
+ {i18nTitle !== '' && (
+ <Title size={'lg'} headingLevel={'h1'}>
+ {i18nTitle}
+ </Title>
+ )}
{i18nDescription !== '' && (
<Text dangerouslySetInnerHTML={{ __html: i18nDescription }} />
)}
@@ -76,9 +81,11 @@ export const ExtensionListView: React.FunctionComponent<IExtensionListViewProps>
>
<>
<br />
- <ButtonLink data-testid={'extension-list-view-empty-state-import-button'}
+ <ButtonLink
+ data-testid={'extension-list-view-empty-state-import-button'}
href={linkImportExtension}
- as={'primary'}>
+ as={'primary'}
+ >
{i18nLinkImportExtension}
</ButtonLink>
</>
