UNPKG

@prosperitainova/dumbo-react-native

Version:
36 lines (34 loc) 972 B
"use strict"; import React from 'react'; import { StyleSheet, View } from 'react-native'; import { getColor } from '../../styles/colors'; import { styleReferenceBreaker } from '../../helpers'; /** Props for Overlay component */ import { jsx as _jsx } from "react/jsx-runtime"; /** * Overlay component for rendering overlay under floating items or menus * * {@link https://github.com/carbon-design-system/carbon-react-native/blob/main/example/src/Views/Overlay.tsx | Example code} */ export class Overlay extends React.Component { get styles() { return StyleSheet.create({ wrapper: { backgroundColor: getColor('overlay'), width: '100%', height: '100%' } }); } render() { const { componentProps, style } = this.props; return /*#__PURE__*/_jsx(View, { style: styleReferenceBreaker(this.styles.wrapper, style), ...(componentProps || {}) }); } } //# sourceMappingURL=index.js.map