1 | "use client";
|
2 |
|
3 | import React from 'react';
|
4 | import { NoFormStyle } from '../form/context';
|
5 | import { NoCompactStyle } from '../space/Compact';
|
6 | const ContextIsolator = props => {
|
7 | const {
|
8 | space,
|
9 | form,
|
10 | children
|
11 | } = props;
|
12 | if (children === undefined || children === null) {
|
13 | return null;
|
14 | }
|
15 | let result = children;
|
16 | if (form) {
|
17 | result = React.createElement(NoFormStyle, {
|
18 | override: true,
|
19 | status: true
|
20 | }, result);
|
21 | }
|
22 | if (space) {
|
23 | result = React.createElement(NoCompactStyle, null, result);
|
24 | }
|
25 | return result;
|
26 | };
|
27 | export default ContextIsolator; |
\ | No newline at end of file |