Fix plugin template too
This commit is contained in:
+31
-47
@@ -1,53 +1,37 @@
|
||||
import React, { FC } from 'react';
|
||||
import { Typography, Grid, makeStyles, Theme } from '@material-ui/core';
|
||||
import { InfoCard, Header, Page, pageTheme } from '@spotify-backstage/core';
|
||||
import { Typography, Grid } from '@material-ui/core';
|
||||
import {
|
||||
InfoCard,
|
||||
Header,
|
||||
Page,
|
||||
pageTheme,
|
||||
Content,
|
||||
} from '@spotify-backstage/core';
|
||||
import ExampleFetchComponent from '../ExampleFetchComponent';
|
||||
|
||||
const useStyles = makeStyles<Theme>(theme => ({
|
||||
mainContentArea: {
|
||||
overflowX: 'hidden',
|
||||
overflowY: 'auto',
|
||||
},
|
||||
pageBody: {
|
||||
padding: theme.spacing(3),
|
||||
},
|
||||
title: {
|
||||
padding: theme.spacing(1, 0, 2, 0),
|
||||
},
|
||||
}));
|
||||
|
||||
const ExampleComponent: FC<{}> = () => {
|
||||
const classes = useStyles();
|
||||
|
||||
return (
|
||||
<Page theme={pageTheme.tool}>
|
||||
<div className={classes.mainContentArea}>
|
||||
<Header title="Welcome to {{ id }}!" subtitle="Optional subtitle" />
|
||||
<Grid
|
||||
container
|
||||
spacing={3}
|
||||
direction="column"
|
||||
className={classes.pageBody}
|
||||
>
|
||||
<Grid item>
|
||||
<Typography variant="h3">Plugin page title</Typography>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<InfoCard title="Information card" maxWidth>
|
||||
<Typography variant="body1">
|
||||
All content should be wrapped in a card like this.
|
||||
</Typography>
|
||||
</InfoCard>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<InfoCard title="Example User List (fetching data from randomuser.me)">
|
||||
<ExampleFetchComponent />
|
||||
</InfoCard>
|
||||
</Grid>
|
||||
const ExampleComponent: FC<{}> = () => (
|
||||
<Page theme={pageTheme.tool}>
|
||||
<Header title="Welcome to {{ id }}!" subtitle="Optional subtitle" />
|
||||
<Content>
|
||||
<Grid container spacing={3} direction="column">
|
||||
<Grid item>
|
||||
<Typography variant="h3">Plugin page title</Typography>
|
||||
</Grid>
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
};
|
||||
<Grid item>
|
||||
<InfoCard title="Information card" maxWidth>
|
||||
<Typography variant="body1">
|
||||
All content should be wrapped in a card like this.
|
||||
</Typography>
|
||||
</InfoCard>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<InfoCard title="Example User List (fetching data from randomuser.me)">
|
||||
<ExampleFetchComponent />
|
||||
</InfoCard>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Content>
|
||||
</Page>
|
||||
);
|
||||
|
||||
export default ExampleComponent;
|
||||
|
||||
Reference in New Issue
Block a user