UNPKG

wix-style-react

Version:
25 lines 1.13 kB
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import { st, classes } from './Content.st.css'; import { dataHooks } from '../constants'; import { WixStyleReactContext } from '../../WixStyleReactProvider/context'; import { SidePanelContext } from '../SidePanelAPI'; class Content extends PureComponent { render() { const { children, className, noPadding, stretchVertically } = this.props; return (React.createElement(SidePanelContext.Consumer, null, ({ skin }) => (React.createElement(WixStyleReactContext.Consumer, null, ({ newColorsBranding }) => (React.createElement("div", { className: st(classes.root, { noPadding, stretchVertically, newColorsBranding, skin }, className), "data-hook": dataHooks.sidePanelContent }, children)))))); } } Content.displayName = 'Content'; Content.propTypes = { className: PropTypes.string, children: PropTypes.node, noPadding: PropTypes.bool, stretchVertically: PropTypes.bool, }; Content.defaultProps = { noPadding: false, stretchVertically: true, }; export default Content; //# sourceMappingURL=Content.js.map