1 | import * as React from 'react';
|
2 | import { SimpleListItemProps } from './SimpleListItem';
|
3 | export interface SimpleListProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onSelect'> {
|
4 |
|
5 | children?: React.ReactNode;
|
6 |
|
7 | className?: string;
|
8 |
|
9 | onSelect?: (ref: React.RefObject<HTMLButtonElement> | React.RefObject<HTMLAnchorElement>, props: SimpleListItemProps) => void;
|
10 |
|
11 | isControlled?: boolean;
|
12 | }
|
13 | export interface SimpleListState {
|
14 |
|
15 | currentRef: React.RefObject<HTMLButtonElement> | React.RefObject<HTMLAnchorElement>;
|
16 | }
|
17 | interface SimpleListContextProps {
|
18 | currentRef: React.RefObject<HTMLButtonElement> | React.RefObject<HTMLAnchorElement>;
|
19 | updateCurrentRef: (id: React.RefObject<HTMLButtonElement> | React.RefObject<HTMLAnchorElement>, props: SimpleListItemProps) => void;
|
20 | isControlled: boolean;
|
21 | }
|
22 | export declare const SimpleListContext: React.Context<Partial<SimpleListContextProps>>;
|
23 | export declare class SimpleList extends React.Component<SimpleListProps, SimpleListState> {
|
24 | static displayName: string;
|
25 | state: {
|
26 | currentRef: React.RefObject<HTMLButtonElement> | React.RefObject<HTMLAnchorElement>;
|
27 | };
|
28 | static defaultProps: SimpleListProps;
|
29 | handleCurrentUpdate: (newCurrentRef: React.RefObject<HTMLButtonElement> | React.RefObject<HTMLAnchorElement>, itemProps: SimpleListItemProps) => void;
|
30 | render(): JSX.Element;
|
31 | }
|
32 | export {};
|
33 |
|
\ | No newline at end of file |