Remove center render prop from PageHeader

Only one instance of use, not worth the added complexity
pull/10616/head
Alex P 2018-06-20 10:37:57 -07:00
parent b944622fbf
commit 8b147b78f7
2 changed files with 0 additions and 19 deletions

View File

@ -7,7 +7,6 @@ import SourceIndicator from 'src/shared/components/SourceIndicator'
interface Props {
title?: string
renderTitle?: () => ReactElement<any>
renderCenter?: () => ReactElement<any>
renderOptions?: () => ReactElement<any>
fullWidth?: boolean
sourceIndicator?: boolean
@ -26,7 +25,6 @@ class PageHeader extends Component<Props> {
<div className={this.className}>
<div className="page-header--container">
<div className="page-header--left">{this.renderLeft}</div>
{this.renderCenter}
<div className="page-header--right">
{this.sourceIndicator}
{this.renderRight}
@ -60,14 +58,6 @@ class PageHeader extends Component<Props> {
return renderTitle()
}
private get renderCenter(): JSX.Element {
const {renderCenter} = this.props
if (renderCenter) {
return <div className="page-header--center">{renderCenter()}</div>
}
}
private get renderRight(): JSX.Element {
const {renderOptions} = this.props

View File

@ -21,8 +21,6 @@ $page-header-weight: 400 !important;
}
.page-header--container {
position: relative;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
@ -38,7 +36,6 @@ $page-header-weight: 400 !important;
// Left, Center, and Right pieces of the page header
.page-header--left,
.page-header--center,
.page-header--right {
display: flex;
align-items: center;
@ -59,12 +56,6 @@ $page-header-weight: 400 !important;
}
}
}
.page-header--center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
// Intended to be a <h1>
.page-header--title {