Clean up code according to review
Signed-off-by: Philipp Hugenroth <philipph@spotify.com>
This commit is contained in:
@@ -100,8 +100,9 @@ export const SupportButton = ({ title, children }: SupportButtonProps) => {
|
||||
color="primary"
|
||||
onClick={onClickHandler}
|
||||
>
|
||||
<HelpIcon />
|
||||
<Box mr={1} />
|
||||
<Box mr={1} height={24}>
|
||||
<HelpIcon />
|
||||
</Box>
|
||||
Support
|
||||
</Button>
|
||||
<Popover
|
||||
|
||||
@@ -57,7 +57,7 @@ const useStyles = (props: ContentHeaderProps) =>
|
||||
},
|
||||
}));
|
||||
|
||||
type DefaultTitleProps = {
|
||||
type ContentHeaderTitleProps = {
|
||||
title?: string;
|
||||
className?: string;
|
||||
};
|
||||
@@ -65,7 +65,7 @@ type DefaultTitleProps = {
|
||||
const ContentHeaderTitle = ({
|
||||
title = 'Unknown page',
|
||||
className,
|
||||
}: DefaultTitleProps) => (
|
||||
}: ContentHeaderTitleProps) => (
|
||||
<Typography
|
||||
variant="h4"
|
||||
component="h2"
|
||||
@@ -77,7 +77,7 @@ const ContentHeaderTitle = ({
|
||||
);
|
||||
|
||||
type ContentHeaderProps = {
|
||||
title?: DefaultTitleProps['title'];
|
||||
title?: ContentHeaderTitleProps['title'];
|
||||
titleComponent?: ComponentType;
|
||||
description?: string;
|
||||
textAlign?: 'left' | 'right' | 'center';
|
||||
|
||||
@@ -14,20 +14,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import React, { ComponentProps } from 'react';
|
||||
|
||||
import { Header } from '../Header';
|
||||
import { Page } from './';
|
||||
import { Page } from './Page';
|
||||
|
||||
interface IProps extends React.ComponentProps<typeof Header> {
|
||||
type ThemedHeaderProps = ComponentProps<typeof Header> & {
|
||||
themeId: string;
|
||||
}
|
||||
};
|
||||
|
||||
export const PageWithHeader = ({
|
||||
themeId,
|
||||
children,
|
||||
...props
|
||||
}: React.PropsWithChildren<IProps>) => (
|
||||
}: React.PropsWithChildren<ThemedHeaderProps>) => (
|
||||
<Page themeId={themeId}>
|
||||
<Header {...props} />
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user