export SeparatorsObj type for re-use in ListItems etc.
Differential Revision: D6354300 fbshipit-source-id: 3fd4c86ef1d190fb544f2c6fccb638ffe3ced378
This commit is contained in:
parent
21714fe197
commit
c6fe101cdc
|
@ -28,6 +28,12 @@ import type {
|
||||||
} from 'ViewabilityHelper';
|
} from 'ViewabilityHelper';
|
||||||
import type {Props as VirtualizedListProps} from 'VirtualizedList';
|
import type {Props as VirtualizedListProps} from 'VirtualizedList';
|
||||||
|
|
||||||
|
export type SeparatorsObj = {
|
||||||
|
highlight: () => void,
|
||||||
|
unhighlight: () => void,
|
||||||
|
updateProps: (select: 'leading' | 'trailing', newProps: Object) => void,
|
||||||
|
};
|
||||||
|
|
||||||
type RequiredProps<ItemT> = {
|
type RequiredProps<ItemT> = {
|
||||||
/**
|
/**
|
||||||
* Takes an item from `data` and renders it into the list. Example usage:
|
* Takes an item from `data` and renders it into the list. Example usage:
|
||||||
|
@ -58,11 +64,7 @@ type RequiredProps<ItemT> = {
|
||||||
renderItem: (info: {
|
renderItem: (info: {
|
||||||
item: ItemT,
|
item: ItemT,
|
||||||
index: number,
|
index: number,
|
||||||
separators: {
|
separators: SeparatorsObj,
|
||||||
highlight: () => void,
|
|
||||||
unhighlight: () => void,
|
|
||||||
updateProps: (select: 'leading' | 'trailing', newProps: Object) => void,
|
|
||||||
},
|
|
||||||
}) => ?React.Element<any>,
|
}) => ?React.Element<any>,
|
||||||
/**
|
/**
|
||||||
* For simplicity, data is just a plain array. If you want to use something else, like an
|
* For simplicity, data is just a plain array. If you want to use something else, like an
|
||||||
|
|
Loading…
Reference in New Issue