PromucFlow_constructor/app/client/src/pages/AppViewer/viewer/AppViewerHeader.tsx

36 lines
837 B
TypeScript
Raw Normal View History

import React from "react";
import styled from "styled-components";
2019-11-25 05:07:27 +00:00
import StyledHeader from "components/designSystems/appsmith/StyledHeader";
2020-05-14 06:06:20 +00:00
import Button from "components/editorComponents/Button";
import { BACK_TO_EDITOR } from "constants/messages";
2019-11-05 05:09:50 +00:00
const HeaderWrapper = styled(StyledHeader)`
position: fixed;
top: 0;
left: 0;
background: white;
2020-05-14 06:06:20 +00:00
display: flex;
justify-content: flex-end;
`;
2020-05-14 06:06:20 +00:00
type AppViewerHeaderProps = {
url?: string;
};
export const AppViewerHeader = (props: AppViewerHeaderProps) => {
2020-05-14 06:06:20 +00:00
return (
<HeaderWrapper>
{props.url && (
<Button
href={props.url}
intent="primary"
icon="chevron-left"
iconAlignment="left"
text={BACK_TO_EDITOR}
filled
/>
)}
</HeaderWrapper>
);
};
export default AppViewerHeader;