0.1.1 • Published 12 months ago

react-native-looped-scroll-timepicker v0.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

react-native-looped-scroll-timepicker

Installation

Using NPM:

$ npm i react-native-looped-scroll-timepicker

Using Yarn:

$ yarn add react-native-looped-scroll-timepicker

Usage

import { LoppedScrollTimepicker } from 'react-native-looped-scroll-timepicker'
<LoppedScrollTimepicker
  onSelect={t => setTime(t)}
  onInit={t => setTime(t)}
  style={styles.picker}
/>

Types

type LoppedScrollTimepickerProps = {
  itemsCount?: number;
  centerIdx?: number;
  hours?: any[];
  minutes?: any[];
  initSelect?: boolean;
  ItemComponent?: React.FC<TimePickerItemProps>;
  style?: StyleProp<ViewStyle>;
  timeFaceStyle?: StyleProp<ViewStyle>;
  itemStyle?: StyleProp<ViewStyle>;
  itemActiveStyle?: StyleProp<ViewStyle>;
  itemTextStyle?: StyleProp<ViewStyle>;
  itemActiveTextStyle?: StyleProp<ViewStyle>;
  onSelect?(time: string): void;
  onInit?(time: string): void;
};

type TimePickerItemProps = {
  item: any;
  isActive?: boolean;
  textActiveScale?: number;
  textActiveColor?: string;
  style?: StyleProp<ViewStyle>;
  activeStyle?: StyleProp<ViewStyle>;
  textStyle?: StyleProp<ViewStyle>;
  activeTextStyle?: StyleProp<ViewStyle>;
};

Authors

0.1.1

12 months ago

0.1.0

12 months ago