Skip to content

Commit

Permalink
fix: missing containerButtonStyle in exported props definition
Browse files Browse the repository at this point in the history
  • Loading branch information
blatinier authored and xcarpentier committed Dec 26, 2019
1 parent 4ce4e91 commit 8c1b884
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/CountryPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ export const CountryPicker = (props: CountryPickerProps) => {
})
const { translation, getCountriesAsync } = useContext()
const { visible, filter, countries, filterFocus } = state

useEffect(() => {
if (state.visible !== props.visible) {
setState({ ...state, visible: props.visible });
setState({ ...state, visible: props.visible || false });
}
}, [props.visible])

const onOpen = () => {
setState({ ...state, visible: true })
if (handleOpen) {
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { CountryProvider, DEFAULT_COUNTRY_CONTEXT } from './CountryContext'
import { ThemeProvider, DEFAULT_THEME, Theme } from './CountryTheme'
import { CountryFilter, CountryFilterProps } from './CountryFilter'
import { ModalProps, FlatListProps } from 'react-native'
import { StyleProp, ViewStyle, ModalProps, FlatListProps } from 'react-native'
import { CountryPicker } from './CountryPicker'

interface Props {
Expand All @@ -36,6 +36,7 @@ interface Props {
withFlag?: boolean
withModal?: boolean
visible?: boolean
containerButtonStyle?: StyleProp<ViewStyle>
renderFlagButton?(props: FlagButton['props']): ReactNode
renderCountryFilter?(props: CountryFilter['props']): ReactNode
onSelect(country: Country): void
Expand Down

0 comments on commit 8c1b884

Please sign in to comment.