react-planner
Version:
react-planner is a React Component for plans design. Draw a 2D floorplan and navigate it in 3D mode.
22 lines (19 loc) • 443 B
JavaScript
import React from 'react';
import PropTypes from 'prop-types';
/**
* @return {null}
*/
export default function If(_ref) {
var condition = _ref.condition,
style = _ref.style,
children = _ref.children;
return condition ? Array.isArray(children) ? React.createElement(
'div',
{ style: style },
children
) : children : null;
}
If.propTypes = {
condition: PropTypes.bool.isRequired,
style: PropTypes.object
};