UNPKG

@wordpress/block-library

Version:
39 lines (33 loc) 852 B
import { createElement } from "@wordpress/element"; /** * External dependencies */ import { View } from 'react-native'; /** * WordPress dependencies */ import { usePreferredColorSchemeStyle } from '@wordpress/compose'; /** * Internal dependencies */ import styles from './figure.scss'; export const Figure = _ref => { let { children, backgroundColor, borderColor } = _ref; const wpPullquoteFigure = usePreferredColorSchemeStyle(styles.light, styles.dark); const customStyles = {}; if (borderColor) { customStyles.borderTopColor = borderColor; customStyles.borderBottomColor = borderColor; } if (backgroundColor) { customStyles.backgroundColor = backgroundColor; } return createElement(View, { style: [wpPullquoteFigure, customStyles] }, children); }; //# sourceMappingURL=figure.native.js.map