import React from 'react'; import SVGIcon from './SVGIcon'; import { Path } from 'react-native-svg'; import type { ICreateIconProps } from './types'; import isEmpty from 'lodash/isEmpty'; export function createIcon({ path, d, ...initialProps }: ICreateIconProps) { const createdIcon = (props: any, ref: any) => { let children = path; if (d && (!path || isEmpty(path))) { children = ; } return ( ); }; return React.memo(React.forwardRef(createdIcon)); }