index.d.ts 829 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import React, {Component} from 'react';
  2. import {
  3. ViewStyle
  4. } from 'react-native';
  5. interface Result {
  6. item: string;
  7. index: number;
  8. }
  9. interface BAPickerModalProps {
  10. modalVisible: boolean;
  11. onClosePress: ()=>void;
  12. list: Array<string>;
  13. selectedIndex: number;
  14. onConfirm: (result: Result) => void;
  15. itemStyle?: ViewStyle;
  16. topBarStyle?: ViewStyle;
  17. cancelTitle?: string;
  18. confirmTitle?: string;
  19. }
  20. export class BAPickerModal extends Component<BAPickerModalProps> {
  21. }
  22. export interface PickerItem {
  23. index: number;
  24. item: string;
  25. }
  26. interface BAPickerProps {
  27. data: Array<string>
  28. style?: ViewStyle;
  29. selectedIndex: number;
  30. itemStyle?: ViewStyle;
  31. onValueChange: (item: PickerItem)=>void
  32. }
  33. export class BAPicker extends Component<BAPickerProps> {
  34. }