import React from 'react'; import { NoFormStyle } from '../form/context'; import { NoCompactStyle } from '../space/Compact'; const ContextIsolator: React.FC< Readonly>>> > = (props) => { const { space, form, children } = props; if (children === undefined || children === null) { return null; } let result: React.ReactNode = children; if (form) { result = ( {result} ); } if (space) { result = {result}; } return result; }; export default ContextIsolator;