import React, { ReactNode } from 'react'; import { Box, Cell, Page } from '@wix/design-system'; import { useIsMobile } from '../../hooks/useIsMobile'; export interface FormPageAdditionalContentProps { /** * Applies a data-hook HTML attribute that can be used in tests */ dataHook?: string; children?: ReactNode; /** * Makes the additional content sticky when scrolling */ sticky?: boolean; } export function FormPageAdditionalContent( props: FormPageAdditionalContentProps, ) { const isMobile = useIsMobile(); const { children, sticky, ...rest } = props; const content = ( {children} ); const wrappedContent = sticky && !isMobile ? {content} : content; return ( {wrappedContent} ); } FormPageAdditionalContent.displayName = 'FormPageAdditionalContent';