mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 14:35:45 +01:00
move favorite icon from details table to page title
This commit is contained in:
@@ -10,6 +10,7 @@ import ErrorBoundary from "../ErrorBoundary";
|
||||
|
||||
type Props = {
|
||||
title?: string;
|
||||
afterTitle?: ReactNode;
|
||||
subtitle?: string;
|
||||
loading?: boolean;
|
||||
error?: Error;
|
||||
@@ -27,6 +28,10 @@ const PageActionContainer = styled.div`
|
||||
}
|
||||
`;
|
||||
|
||||
const MarginLeft = styled.div`
|
||||
margin-left: 0.5rem;
|
||||
`;
|
||||
|
||||
export default class Page extends React.Component<Props> {
|
||||
componentDidUpdate() {
|
||||
const { title } = this.props;
|
||||
@@ -57,7 +62,7 @@ export default class Page extends React.Component<Props> {
|
||||
}
|
||||
|
||||
renderPageHeader() {
|
||||
const { error, title, subtitle, children } = this.props;
|
||||
const { error, title, afterTitle, subtitle, children } = this.props;
|
||||
|
||||
let pageActions = null;
|
||||
let pageActionsExists = false;
|
||||
@@ -81,7 +86,9 @@ export default class Page extends React.Component<Props> {
|
||||
<>
|
||||
<div className="columns">
|
||||
<div className="column">
|
||||
<Title title={title} />
|
||||
<div className="is-flex">
|
||||
<Title title={title} /> <MarginLeft>{afterTitle}</MarginLeft>
|
||||
</div>
|
||||
<Subtitle subtitle={subtitle} />
|
||||
</div>
|
||||
{pageActions}
|
||||
|
||||
Reference in New Issue
Block a user