ExamplePage.tsx 1.6 KB

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