add required headingLevel prop to Title for ApiConnectorListView
@@ -6,7 +6,7 @@ import {
EmptyStateVariant,
Text,
Title,
- Tooltip
+ Tooltip,
} from '@patternfly/react-core';
import { AddCircleOIcon } from '@patternfly/react-icons';
import * as React from 'react';
@@ -24,8 +24,8 @@ export interface IApiConnectorListViewProps extends IListViewToolbarProps {
linkCreateApiConnector: string;
}
-export const ApiConnectorListView: React.FunctionComponent<IApiConnectorListViewProps> = (
- {
+export const ApiConnectorListView: React.FunctionComponent<IApiConnectorListViewProps> =
+ ({
children,
i18nDescription,
i18nEmptyStateInfo,
@@ -41,24 +41,28 @@ export const ApiConnectorListView: React.FunctionComponent<IApiConnectorListView
<PageSection>
<ListViewToolbar {...rest}>
<div className={'form-group'}>
- <ButtonLink data-testid={'api-connector-list-view-create-button'}
+ <ButtonLink
+ data-testid={'api-connector-list-view-create-button'}
href={linkCreateApiConnector}
- as={'primary'}>
+ as={'primary'}
+ >
{i18nLinkCreateApiConnector}
</ButtonLink>
</div>
</ListViewToolbar>
{i18nTitle !== '' && (
- <Title size="xl">{i18nTitle}</Title>
+ <Title size="xl" headingLevel={'h2'}>
+ {i18nTitle}
+ </Title>
)}
{i18nDescription !== '' && (
- <Text
- dangerouslySetInnerHTML={{ __html: i18nDescription }}
- />
+ <Text dangerouslySetInnerHTML={{ __html: i18nDescription }} />
)}
{children ? (
- <DataList data-testid={'api-connector-list'}
- aria-label={'api connector list'}>
+ <DataList
+ data-testid={'api-connector-list'}
+ aria-label={'api connector list'}
+ >
{children}
</DataList>
) : (
@@ -79,9 +83,13 @@ export const ApiConnectorListView: React.FunctionComponent<IApiConnectorListView
>
<>
<br />
- <ButtonLink data-testid={'api-connector-list-view-empty-state-create-button'}
+ <ButtonLink
+ data-testid={
+ 'api-connector-list-view-empty-state-create-button'
+ }
href={linkCreateApiConnector}
- as={'primary'}>
+ as={'primary'}
+ >
{i18nLinkCreateApiConnector}
</ButtonLink>
</>
