@geist-ui/react
Version:
Modern and minimalist React UI library.
15 lines (14 loc) • 1.41 kB
TypeScript
import React, { ReactNode } from 'react';
export declare const getId: () => string;
export declare const capitalize: (str: string | symbol | number | undefined | null) => string;
export declare const hasChild: (children: ReactNode | undefined, child: React.ElementType) => boolean;
export declare const pickChild: (children: ReactNode | undefined, targetChild: React.ElementType) => [ReactNode | undefined, ReactNode | undefined];
export declare const pickChildByProps: (children: ReactNode | undefined, key: string, value: any) => [ReactNode | undefined, ReactNode | undefined];
export declare const pickChildrenFirst: (children: ReactNode | undefined) => ReactNode | undefined;
export declare const setChildrenProps: (children: ReactNode | undefined, props: Record<string, unknown>, targetComponents?: Array<React.ElementType>) => ReactNode | undefined;
export declare const setChildrenIndex: (children: ReactNode | undefined, targetComponents?: Array<React.ElementType>) => ReactNode | undefined;
export declare const getReactNode: (node?: React.ReactNode | (() => React.ReactNode)) => React.ReactNode;
export declare const isChildElement: (parent: Element | null | undefined, child: Element | null | undefined) => boolean;
export declare const isBrowser: () => boolean;
export declare const isMac: () => boolean;
export declare const isCSSNumberValue: (value?: string | number | undefined) => boolean;