Skip to content

Commit

Permalink
use picker from @react-native-community
Browse files Browse the repository at this point in the history
  • Loading branch information
slauzinho committed Oct 2, 2020
1 parent 5eda1fe commit cb95213
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},
"homepage": "https://github.com/kalontech/ReactNativeWheelPicker",
"dependencies": {
"@react-native-community/picker": "^1.8.0",
"moment": "^2.24.0"
}
}
9 changes: 6 additions & 3 deletions src/WheelPicker.ios.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import React, { useState } from "react";
import { Picker, View } from "react-native";
import { View } from "react-native";
import { Picker } from "@react-native-community/picker";
import { PickerItemProps } from "@react-native-community/picker/typings/Picker";

interface Props {
type Props = {
data: Array<string>;
selectedItem?: number;
onItemSelected?: Function;
disabled?: boolean;
}
} & PickerItemProps;

const WheelPicker: React.FC<Props> = props => {
const [selectedItem, setSelectedItem] = useState(props.selectedItem || 0);
const { data, onItemSelected, disabled } = props;
Expand Down

0 comments on commit cb95213

Please sign in to comment.