@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
33 lines • 1.15 kB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
const _excluded = ["className", "backgroundColor", "ref"];
import React from 'react';
import Section from '../../section/Section';
import ModalContext from '../ModalContext';
import classnames from 'classnames';
export default class ModalInner extends React.PureComponent {
componentDidMount() {
const {
backgroundColor = 'black-3'
} = this.props;
if (backgroundColor) {
this.context.setBackgroundColor(backgroundColor);
}
}
render() {
const _this$props = this.props,
{
className = null,
backgroundColor = 'black-3',
ref
} = _this$props,
props = _objectWithoutProperties(_this$props, _excluded);
return React.createElement(Section, _extends({
backgroundColor: backgroundColor,
className: classnames(className)
}, props));
}
}
_defineProperty(ModalInner, "contextType", ModalContext);
//# sourceMappingURL=ModalInner.js.map