mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
18 lines
311 B
TypeScript
18 lines
311 B
TypeScript
import React from 'react';
|
|
|
|
export function isElement(value: any): value is React.ReactElement {
|
|
if (Array.isArray(value) || value === null) {
|
|
return false;
|
|
}
|
|
|
|
if (typeof value === 'object') {
|
|
if (value.type === React.Fragment) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|