chore: update example component

This commit is contained in:
Marvin9
2020-10-15 09:37:13 +05:30
parent 8f0608a5ed
commit fe47cb9f07
2 changed files with 3 additions and 7 deletions
@@ -3,14 +3,12 @@
ExampleComponent.tsx reference
```tsx
import { BackstageTheme } from '@backstage/theme';
import React, { FC } from 'react';
import { Typography, Grid, useTheme } from '@material-ui/core';
import { Typography, Grid } from '@material-ui/core';
import {
InfoCard,
Header,
Page,
pageTheme,
Content,
ContentHeader,
HeaderLabel,
@@ -21,13 +19,12 @@ import { useApi } from '@backstage/core-api';
import ExampleFetchComponent from '../ExampleFetchComponent';
const ExampleComponent: FC<{}> = () => {
const backstageTheme = useTheme<BackstageTheme>();
const identityApi = useApi(identityApiRef);
const userId = identityApi.getUserId();
const profile = identityApi.getProfile();
return (
<Page theme={backstageTheme.getPageTheme({ themeId: 'tool' })}>
<Page themeId="tool">
<Header
title="Welcome to github-playground!"
subtitle="Optional subtitle"
@@ -1,4 +1,3 @@
import { pageTheme } from '@backstage/theme';
import React, { FC } from 'react';
import { Typography, Grid } from '@material-ui/core';
import {
@@ -14,7 +13,7 @@ import ExampleFetchComponent from '../ExampleFetchComponent';
const ExampleComponent: FC<{}> = () => {
return (
<Page theme={pageTheme.tool}>
<Page themeId="tool">
<Header title="Welcome to {{ id }}!" subtitle="Optional subtitle">
<HeaderLabel label="Owner" value="Team X" />
<HeaderLabel label="Lifecycle" value="Alpha" />