mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
re-structure to monorepo.
This commit is contained in:
12
packages/webapp/src/components/Utils/If.tsx
Normal file
12
packages/webapp/src/components/Utils/If.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
// @ts-nocheck
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
export const If = (props) =>
|
||||
props.condition ? (props.render ? props.render() : props.children) : null;
|
||||
|
||||
If.propTypes = {
|
||||
// condition: PropTypes.bool.isRequired,
|
||||
children: PropTypes.node,
|
||||
render: PropTypes.func,
|
||||
};
|
||||
Reference in New Issue
Block a user