Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (
);
}
// Listen to directional updates via props
// eslint-disable-next-line no-func-assign
WithStyles = withDirection(WithStyles);
// Make into a pure functional component if requested
// eslint-disable-next-line no-func-assign
WithStyles = pureComponent ? memo(WithStyles) : WithStyles;
// Set React statics on WithStyles
WithStyles.WrappedComponent = WrappedComponent;
WithStyles.displayName = `withStyles(${wrappedComponentName})`;
if (WrappedComponent.propTypes) {
WithStyles.propTypes = { ...WrappedComponent.propTypes };
delete WithStyles.propTypes[stylesPropName];
delete WithStyles.propTypes[themePropName];
delete WithStyles.propTypes[cssPropName];
}
if (WrappedComponent.defaultProps) {
WithStyles.defaultProps = { ...WrappedComponent.defaultProps };