1 | import * as React from 'react';
|
2 | import { UIDProps } from './context';
|
3 | /**
|
4 | * @deprecated
|
5 | * UID in form of renderProps (not SSR friendly)
|
6 | * @see https://github.com/thearnica/react-uid#react-components
|
7 | * @example
|
8 | * // get UID to connect label to input
|
9 | * <UID>
|
10 | * {(id)} => <label htmlFor={id}><input id={id}/>}
|
11 | * </UID>
|
12 | *
|
13 | * // get uid to generate uid for a keys in a list
|
14 | * <UID>
|
15 | * {(, uid)} => items.map(item => <li key={uid(item) />)}
|
16 | * </UID>
|
17 | */
|
18 | export declare class UID extends React.Component<UIDProps> {
|
19 | state: {
|
20 | quartz: import("./context").IdSourceType;
|
21 | prefix: string;
|
22 | id: number;
|
23 | };
|
24 | uid: (item: any) => string;
|
25 | render(): React.ReactNode;
|
26 | }
|