Skip to content

Commit

Permalink
Fix various small type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
swansontec committed Jun 23, 2023
1 parent 868ed3c commit 742e194
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/legacy/AirshipModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function AirshipModal<T>(props: Props<T>) {
onCancel={onCancel}
underlay={<BlurView blurType="dark" style={StyleSheet.absoluteFill} />}
>
{typeof children === 'function' ? children({ bottom: 50, left: 0, right: 0, top: 0 }) : children}
{children}
</RealAirshipModal>
)
}
6 changes: 3 additions & 3 deletions src/components/legacy/FormField.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { Dimensions, ViewStyle } from 'react-native'
import { Dimensions } from 'react-native'
import { TextField, TextFieldProps } from 'react-native-material-textfield'

import { THEME } from '../../theme/variables/airbitz'
Expand Down Expand Up @@ -30,11 +30,11 @@ export class FormField extends React.Component<Props> {
}
}

const containerStyle: ViewStyle = {
const containerStyle = {
position: 'relative',
width: Dimensions.get('window').width / 1.52,
height: 60
}
} as const

export const MaterialInputOnWhite = {
containerStyle,
Expand Down
5 changes: 2 additions & 3 deletions src/components/progress-indicators/FillLoader.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import * as React from 'react'
import { ActivityIndicator, StyleSheet, View, ViewPropTypes } from 'react-native'
import { ActivityIndicator, StyleSheet, View, ViewStyle } from 'react-native'

import { THEME } from '../../theme/variables/airbitz'

interface Props {
// @ts-expect-error
indicatorStyles?: ViewPropTypes.style
indicatorStyles?: ViewStyle
size?: 'large' | 'small'
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/scenes/Loans/LoanCreateScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export const LoanCreateScene = (props: Props) => {
.catch(e => showError(e.message))
}

const handleBorrowAmountChanged = React.useCallback((fiatAmount, nativeCryptoAmount) => {
const handleBorrowAmountChanged = React.useCallback((fiatAmount: string, nativeCryptoAmount: string) => {
setBorrowAmountFiat(fiatAmount)
setNativeCryptoBorrowAmount(nativeCryptoAmount)
}, [])
Expand Down

0 comments on commit 742e194

Please sign in to comment.