UNPKG

@wordpress/block-library

Version:
51 lines (47 loc) 1.28 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _reactNative = require("react-native"); var _components = require("@wordpress/components"); var _editor = _interopRequireDefault(require("./editor.scss")); var _jsxRuntime = require("react/jsx-runtime"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function ColorBackground({ children, borderRadiusValue, backgroundColor }) { const { isGradient } = _components.colorsUtils; const wrapperStyles = [_editor.default.richTextWrapper, { borderRadius: borderRadiusValue, backgroundColor }]; return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, { style: wrapperStyles, children: [isGradient(backgroundColor) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Gradient, { gradientValue: backgroundColor, angleCenter: { x: 0.5, y: 0.5 }, style: [_editor.default.linearGradient, { borderRadius: borderRadiusValue }] }), children] }); } var _default = exports.default = ColorBackground; //# sourceMappingURL=color-background.native.js.map