Merge pull request #15973 from awanlin/topic/fix-welcome-title-styling
Fixed WelcomeTitle regression
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright 2023 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Header } from '@backstage/core-components';
|
||||
import { wrapInTestApp } from '@backstage/test-utils';
|
||||
import React, { ComponentType } from 'react';
|
||||
import { WelcomeTitle } from './WelcomeTitle';
|
||||
|
||||
export default {
|
||||
title: 'Plugins/Home/Components/WelcomeTitle',
|
||||
decorators: [(Story: ComponentType<{}>) => wrapInTestApp(<Story />)],
|
||||
};
|
||||
|
||||
export const Default = () => {
|
||||
return <Header title={<WelcomeTitle />} pageTitleOverride="Home" />;
|
||||
};
|
||||
@@ -18,8 +18,7 @@ import {
|
||||
identityApiRef,
|
||||
useApi,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { Tooltip } from '@material-ui/core';
|
||||
import Typography from '@material-ui/core/Typography';
|
||||
import { Tooltip, Typography } from '@material-ui/core';
|
||||
import React, { useEffect, useMemo } from 'react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { getTimeBasedGreeting } from './timeUtil';
|
||||
@@ -44,7 +43,7 @@ export const WelcomeTitle = () => {
|
||||
|
||||
return (
|
||||
<Tooltip title={greeting.language}>
|
||||
<Typography component="span">{`${greeting.greeting}${
|
||||
<Typography component="span" variant="inherit">{`${greeting.greeting}${
|
||||
profile?.displayName ? `, ${profile?.displayName}` : ''
|
||||
}!`}</Typography>
|
||||
</Tooltip>
|
||||
|
||||
Reference in New Issue
Block a user