@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
25 lines (24 loc) • 3.27 kB
TypeScript
import * as react_jsx_runtime3 from "react/jsx-runtime";
import * as React from "react";
//#region src/utils/children.d.ts
declare function getValidChildren(children: React.ReactNode): React.ReactElement<any>[];
declare function useValidChildren(children: React.ReactNode): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
declare function isValidElement(child: any): child is React.ReactNode;
declare function isSomeDisplayName(a: any, b: any): boolean;
declare function isSomeElement(a: any, b: any): boolean;
declare function findChild<Y = any>(children: React.ReactElement[], ...types: (React.JSXElementConstructor<any> | string)[]): React.ReactElement<Y> | undefined;
declare function useFindChild<Y = any>(children: React.ReactElement[], ...types: (React.JSXElementConstructor<any> | string)[]): React.ReactElement<Y> | undefined;
declare function findChildren<Y = any, M = any>(children: React.ReactElement[], ...types: (React.JSXElementConstructor<any> | string)[]): [React.ReactElement<Y> | undefined, ...React.ReactElement<M>[]];
declare function useFindChildren<Y = any, M = any>(children: React.ReactElement<M>[], ...types: (React.JSXElementConstructor<any> | string)[]): [React.ReactElement<Y> | undefined, ...React.ReactElement<M>[]];
declare function includesChildren(children: React.ReactElement<any>[], ...types: (React.JSXElementConstructor<any> | string)[]): boolean;
declare function useIncludesChildren(children: React.ReactElement<any>[], ...types: (React.JSXElementConstructor<any> | string)[]): boolean;
declare function omitChildren<Y = any>(children: React.ReactElement[], ...types: (React.JSXElementConstructor<any> | string)[]): React.ReactElement<Y>[];
declare function useOmitChildren<Y = any>(children: React.ReactElement<any>[], ...types: (React.JSXElementConstructor<any> | string)[]): React.ReactElement<Y>[];
declare function pickChildren<Y = any>(children: React.ReactElement[], ...types: (React.JSXElementConstructor<any> | string)[]): React.ReactElement<Y>[];
declare function usePickChildren<Y = any>(children: React.ReactElement<any>[], ...types: (React.JSXElementConstructor<any> | string)[]): React.ReactElement<Y>[];
declare function splitChildren<Y = any, M = any>(children: React.ReactNode, ...types: ((React.JSXElementConstructor<any> | string)[] | React.JSXElementConstructor<any> | string)[]): [React.ReactElement<M>[] | React.ReactNode, ...(React.ReactElement<Y> | undefined)[]];
declare function useSplitChildren<Y = any, M = any>(children: React.ReactNode, ...types: ((React.JSXElementConstructor<any> | string)[] | React.JSXElementConstructor<any> | string)[]): [React.ReactElement<M>[] | React.ReactNode, ...(React.ReactElement<Y> | undefined)[]];
declare const wrapOrPassProps: <Y extends React.PropsWithChildren>(Component: React.FC<Y>, nodeOrProps: React.ReactNode | Y, additionalProps?: Y) => react_jsx_runtime3.JSX.Element | null;
//#endregion
export { findChild, findChildren, getValidChildren, includesChildren, isSomeDisplayName, isSomeElement, isValidElement, omitChildren, pickChildren, splitChildren, useFindChild, useFindChildren, useIncludesChildren, useOmitChildren, usePickChildren, useSplitChildren, useValidChildren, wrapOrPassProps };
//# sourceMappingURL=children.d.ts.map