File size: 649 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import type { CellPluginComponentProps } from '@react-page/editor';
import { lazyLoad } from '@react-page/editor';
import React from 'react';
import type { SpacerState } from '../types/state';
const SpacerResizable = lazyLoad(() => import('./SpacerResizable'));
const SpacerHtmlRenderer: React.FC<CellPluginComponentProps<SpacerState>> = (
props
) => {
return (
<div className={'react-page-plugins-content-spacer'}>
{props.isEditMode ? (
<SpacerResizable {...props} />
) : (
<div style={{ height: `${(props.data?.height || 0).toString()}px` }} />
)}
</div>
);
};
export default SpacerHtmlRenderer;
|