UNPKG

@wordpress/block-library

Version:
44 lines (40 loc) 1.12 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.Figure = void 0; var _reactNative = require("react-native"); var _compose = require("@wordpress/compose"); var _figure = _interopRequireDefault(require("./figure.scss")); var _jsxRuntime = require("react/jsx-runtime"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ const Figure = ({ children, backgroundColor, borderColor }) => { const wpPullquoteFigure = (0, _compose.usePreferredColorSchemeStyle)(_figure.default.light, _figure.default.dark); const customStyles = {}; if (borderColor) { customStyles.borderTopColor = borderColor; customStyles.borderBottomColor = borderColor; } if (backgroundColor) { customStyles.backgroundColor = backgroundColor; } return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { style: [wpPullquoteFigure, customStyles], children: children }); }; exports.Figure = Figure; //# sourceMappingURL=figure.native.js.map