generated from openshift/console-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExamplePage.tsx
52 lines (50 loc) · 1.81 KB
/
ExamplePage.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import * as React from 'react';
import Helmet from 'react-helmet';
import {
Page,
PageSection,
Text,
TextContent,
Title,
} from '@patternfly/react-core';
import './example.css';
import { useTranslation } from 'react-i18next';
export default function ExamplePage() {
const { t } = useTranslation('plugin__console-plugin-template');
return (
<>
<Helmet>
<title data-test="example-page-title">{t('Hello, Plugin!')}</title>
</Helmet>
<Page>
<PageSection variant="light">
<Title headingLevel="h1">{t('Hello, Plugin!')}</Title>
</PageSection>
<PageSection variant="light">
<TextContent>
<Text component="p">
<span className="console-plugin-template__nice">
{t('Nice!')}
</span>{' '}
{t('Your plugin is working.')}
</Text>
<Text component="p">
{t(
'This is a custom page contributed by the console plugin template. The extension that adds the page is declared in console-extensions.json in the project root along with the corresponding nav item. Update console-extensions.json to change or add extensions. Code references in console-extensions.json must have a corresponding property',
)}
<code>{t('exposedModules')}</code>{' '}
{t('in package.json mapping the reference to the module.')}
</Text>
<Text component="p">
{t('After cloning this project, replace references to')}{' '}
<code>{t('console-template-plugin')}</code>{' '}
{t(
'and other plugin metadata in package.json with values for your plugin.',
)}
</Text>
</TextContent>
</PageSection>
</Page>
</>
);
}