Simplify welcome screen (#728)

* Simplify welcome screen

* Delete non-used code

* Review comments
This commit is contained in:
Stefan Ålund
2020-05-06 17:25:38 +02:00
committed by GitHub
parent ccee67c333
commit f9a9e8cea2
6 changed files with 44 additions and 228 deletions
@@ -19,7 +19,7 @@ import { Typography, makeStyles } from '@material-ui/core';
import { BackstageTheme } from '@backstage/theme';
import ErrorOutline from '@material-ui/icons/ErrorOutline';
const useErrorOutlineStyles = makeStyles<BackstageTheme>(theme => ({
const useErrorOutlineStyles = makeStyles<BackstageTheme>((theme) => ({
root: {
marginRight: theme.spacing(1),
fill: theme.palette.warningText,
@@ -30,7 +30,7 @@ const ErrorOutlineStyled = () => {
return <ErrorOutline classes={classes} />;
};
const useStyles = makeStyles<BackstageTheme>(theme => ({
const useStyles = makeStyles<BackstageTheme>((theme) => ({
message: {
display: 'flex',
flexDirection: 'column',
@@ -62,7 +62,7 @@ type Props = {
title?: string;
};
const WarningPanel: FC<Props> = props => {
const WarningPanel: FC<Props> = (props) => {
const classes = useStyles(props);
const { title, message, children } = props;
return (
@@ -74,7 +74,9 @@ const WarningPanel: FC<Props> = props => {
</Typography>
</div>
{message && (
<Typography className={classes.messageText}>{message}</Typography>
<Typography className={classes.messageText} variant="body2">
{message}
</Typography>
)}
{children}
</div>