UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

30 lines 930 B
import _extends from "@babel/runtime-corejs3/helpers/esm/extends"; import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty"; import React from 'react'; import Section from "../../section/Section.js"; import ModalContext from "../ModalContext.js"; 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 { className = null, backgroundColor = 'black-3', ref, ...props } = this.props; return React.createElement(Section, _extends({ backgroundColor: backgroundColor, className: classnames(className) }, props)); } } _defineProperty(ModalInner, "contextType", ModalContext); //# sourceMappingURL=ModalInner.js.map