import React from 'react'; import { Story } from '../../interfaces'; import Header from "./../../components/Header"; const withHeader: React.FC<{ story: Story, globalHeader: Function }> = ({ story, globalHeader, children }) => { return <> {children} {story.header && (
{typeof story === "object" ? ( globalHeader ? ( globalHeader(story.header) ) : (
) ) : null}
)} } export default withHeader;