Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update function types #533

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ export default function App() {
- `renderFlagButton?`(props: (FlagButton['props'])): ReactNode ([FlagButton props](https://github.com/xcarpentier/react-native-country-picker-modal/blob/master/src/FlagButton.tsx#L73))
- `renderCountryFilter?`(props: CountryFilter['props']): ReactNode ([CountryFilter props is TextInputProps](https://facebook.github.io/react-native/docs/textinput#props))
- `onSelect`(country: Country): void ([Country](https://github.com/xcarpentier/react-native-country-picker-modal/blob/master/src/types.ts#L263))
- `onOpen`(): void
- `onClose`(): void
- `onOpen`: () => void
- `onClose`: () => void
- `closeButtonImage?`: [ImageSourcePropType](https://facebook.github.io/react-native/docs/image#props)
- `closeButtonStyle?`: StyleProp<ViewStyle>
- `closeButtonImageStyle?`: StyleProp<ImageStyle>
Expand Down
2 changes: 1 addition & 1 deletion src/CloseButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface CloseButtonProps {
style?: StyleProp<ViewStyle>
imageStyle?: StyleProp<ImageStyle>
image?: ImageSourcePropType
onPress?(): void
onPress?: () => void
}

const CloseButtonAndroid: React.FC<CloseButtonProps> = (props) => {
Expand Down
4 changes: 2 additions & 2 deletions src/CountryPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ interface CountryPickerProps {
props: React.ComponentProps<typeof CountryFilter>,
): ReactNode
onSelect(country: Country): void
onOpen?(): void
onClose?(): void
onOpen?: () => void
onClose?: () => void
}

export const CountryPicker = (props: CountryPickerProps) => {
Expand Down
2 changes: 1 addition & 1 deletion src/FlagButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export interface FlagButtonProps {
containerButtonStyle?: StyleProp<ViewStyle>
countryCode?: CountryCode
placeholder: string
onOpen?(): void
onOpen?: () => void
}

export const FlagButton = ({
Expand Down
2 changes: 1 addition & 1 deletion src/HeaderModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface HeaderModalProps {
closeButtonImage?: ImageSourcePropType
closeButtonStyle?: StyleProp<ViewStyle>
closeButtonImageStyle?: StyleProp<ImageStyle>
onClose(): void
onClose: () => void
renderFilter(props: HeaderModalProps): ReactNode
}
export const HeaderModal = (props: HeaderModalProps) => {
Expand Down
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ interface Props {
renderFlagButton?(props: FlagButtonProps): ReactNode
renderCountryFilter?(props: CountryFilterProps): ReactNode
onSelect(country: Country): void
onOpen?(): void
onClose?(): void
onOpen?: () => void
onClose?: () => void
}

const Main = ({ theme, translation, ...props }: Props) => {
Expand Down