Current Path : /storage/v11800/alliedessence/public_html/wp-content/plugins/lottiefiles/src/hoc/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/alliedessence/public_html/wp-content/plugins/lottiefiles/src/hoc/with-base.tsx |
/**
* Copyright 2022 Design Barn Inc.
*/
import * as React from 'react';
import { Sidebar } from '../gutenberg-block/Layout';
import { IHostAppProps } from '../interfaces';
interface IBaseProps {
SidebarContent: React.FC<P>;
}
export const withBase =
(props: IBaseProps) =>
(WrappedComponent: React.FC<P>): React.FC<P> => {
const { SidebarContent } = props;
const Base: React.FC<IHostAppProps> = ({ attributes, setAttributes }: IHostAppProps): JSX.Element => {
return (
<div
style={{
display: 'flex',
height: 'calc(100% - 80px)',
minHeight: '600px',
}}
>
<Sidebar>{<SidebarContent />}</Sidebar>
<div className="lf-flex-grow p-1 lf-bg-contentBg lf-overflow-auto lf-pb-0">
<WrappedComponent attributes={attributes} setAttributes={setAttributes} />
</div>
</div>
);
};
return Base;
};