@atlaskit/renderer
Version:
Renderer component
24 lines • 826 B
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
export const Context = /*#__PURE__*/React.createContext(new Map());
export const Provider = function ({
children
}) {
return /*#__PURE__*/React.createElement(Context.Provider, {
value: new Map()
}, children);
};
export const withSmartCardStorage = WrappedComponent => {
// Ignored via go/ees005
// eslint-disable-next-line react/prefer-stateless-function
return class extends React.Component {
render() {
return /*#__PURE__*/React.createElement(Context.Consumer, null, storage => /*#__PURE__*/React.createElement(WrappedComponent
// Ignored via go/ees005
// eslint-disable-next-line react/jsx-props-no-spreading
, _extends({}, this.props, {
smartCardStorage: storage
})));
}
};
};