fix(tech-radar): add overflowX scroll to the company radar section

This commit is contained in:
Abhishek Jakhar
2020-10-16 09:21:52 +05:30
parent 5ff5b1325d
commit 02c60b5f8b
2 changed files with 36 additions and 22 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-tech-radar': patch
---
fix the horizontal scrolling issue in the RadarPage component
+31 -22
View File
@@ -15,7 +15,7 @@
*/
import React from 'react';
import { Grid } from '@material-ui/core';
import { Grid, makeStyles } from '@material-ui/core';
import {
Content,
ContentHeader,
@@ -27,6 +27,12 @@ import {
import RadarComponent from '../components/RadarComponent';
import { TechRadarComponentProps } from '../api';
const useStyles = makeStyles(() => ({
overflowXScroll: {
overflowX: 'scroll',
},
}));
export type TechRadarPageProps = TechRadarComponentProps & {
title?: string;
subtitle?: string;
@@ -38,28 +44,31 @@ export const RadarPage = ({
subtitle,
pageTitle,
...props
}: TechRadarPageProps): JSX.Element => (
<Page themeId="tool">
<Header title={title} subtitle={subtitle}>
<HeaderLabel label="Owner" value="Spotify" />
<HeaderLabel label="Lifecycle" value="Beta" />
</Header>
<Content>
<ContentHeader title={pageTitle}>
<SupportButton>
This is used for visualizing the official guidelines of different
areas of software development such as languages, frameworks,
infrastructure and processes.
</SupportButton>
</ContentHeader>
<Grid container spacing={3} direction="row">
<Grid item xs={12} sm={6} md={4}>
<RadarComponent {...props} />
}: TechRadarPageProps): JSX.Element => {
const classes = useStyles();
return (
<Page themeId="tool">
<Header title={title} subtitle={subtitle}>
<HeaderLabel label="Owner" value="Spotify" />
<HeaderLabel label="Lifecycle" value="Beta" />
</Header>
<Content className={classes.overflowXScroll}>
<ContentHeader title={pageTitle}>
<SupportButton>
This is used for visualizing the official guidelines of different
areas of software development such as languages, frameworks,
infrastructure and processes.
</SupportButton>
</ContentHeader>
<Grid container spacing={3} direction="row">
<Grid item xs={12} sm={6} md={4}>
<RadarComponent {...props} />
</Grid>
</Grid>
</Grid>
</Content>
</Page>
);
</Content>
</Page>
);
};
RadarPage.defaultProps = {
title: 'Tech Radar',