chore: Standardized headers (#1883)
* feat: Collection to standard header feat: Sticky tabs * chore: Document to standard header * chore: Dashboard -> Home chore: Scene component * chore: Trash, Templates, Drafts * fix: Mobile improvements * fix: Content showing at sides and occassionally ontop of sticky headers
This commit is contained in:
50
app/components/Scene.js
Normal file
50
app/components/Scene.js
Normal file
@ -0,0 +1,50 @@
|
||||
// @flow
|
||||
import * as React from "react";
|
||||
import styled from "styled-components";
|
||||
import CenteredContent from "components/CenteredContent";
|
||||
import Header from "components/Header";
|
||||
import PageTitle from "components/PageTitle";
|
||||
|
||||
type Props = {|
|
||||
icon?: React.Node,
|
||||
title: React.Node,
|
||||
textTitle?: string,
|
||||
children: React.Node,
|
||||
breadcrumb?: React.Node,
|
||||
actions?: React.Node,
|
||||
|};
|
||||
|
||||
function Scene({
|
||||
title,
|
||||
icon,
|
||||
textTitle,
|
||||
actions,
|
||||
breadcrumb,
|
||||
children,
|
||||
}: Props) {
|
||||
return (
|
||||
<FillWidth>
|
||||
<PageTitle title={textTitle || title} />
|
||||
<Header
|
||||
title={
|
||||
icon ? (
|
||||
<>
|
||||
{icon} {title}
|
||||
</>
|
||||
) : (
|
||||
title
|
||||
)
|
||||
}
|
||||
actions={actions}
|
||||
breadcrumb={breadcrumb}
|
||||
/>
|
||||
<CenteredContent withStickyHeader>{children}</CenteredContent>
|
||||
</FillWidth>
|
||||
);
|
||||
}
|
||||
|
||||
const FillWidth = styled.div`
|
||||
width: 100%;
|
||||
`;
|
||||
|
||||
export default Scene;
|
Reference in New Issue
Block a user