mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
13 lines
294 B
JavaScript
13 lines
294 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
const If = props => props.condition
|
|
? (props.render ? props.render() : props.children) : null;
|
|
|
|
If.propTypes = {
|
|
// condition: PropTypes.bool.isRequired,
|
|
children: PropTypes.node,
|
|
render: PropTypes.func
|
|
};
|
|
|
|
export default If; |