Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Grommet.prototype.render = function render() {
var _props = this.props,
children = _props.children,
rest = _objectWithoutProperties(_props, ['children']);
delete rest.theme;
var _state = this.state,
responsive = _state.responsive,
theme = _state.theme;
return React.createElement(
ThemeContext.Provider,
{ value: theme },
React.createElement(
IconThemeContext.Provider,
{ value: theme.icon },
React.createElement(
ResponsiveContext.Provider,
{ value: responsive },
React.createElement(
StyledGrommet,
_extends({}, rest, { theme: theme }),
children
)
)
)
);
};
}
if (onEsc) {
content = React.createElement(
Keyboard,
{ target: 'document', onEsc: onEsc },
content
);
}
if (modal) {
content = React.createElement(
FocusedContainer,
{ hidden: position === 'hidden', restrictScroll: true },
React.createElement(
IconThemeContext.Provider,
{ value: theme.icon },
content
)
);
}
return content;
};
innerRef: forwardRef,
directionProp: direction,
elevationProp: elevation,
fillProp: fill,
overflowProp: overflow,
wrapProp: wrap,
responsive: responsive,
theme: theme
}, rest),
contents
);
if (stateTheme) {
if (stateTheme.dark !== propsTheme.dark && stateTheme.icon) {
content = React.createElement(
IconThemeContext.Provider,
{ value: stateTheme.icon },
content
);
}
content = React.createElement(
ThemeContext.Provider,
{ value: stateTheme },
content
);
}
return content;
};