UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

29 lines 820 B
import _extends from "@babel/runtime/helpers/esm/extends"; 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 { static contextType = ModalContext; 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)); } } //# sourceMappingURL=ModalInner.js.map