@wordpress/block-library
Version:
Block library for the WordPress editor.
39 lines (33 loc) • 852 B
JavaScript
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