Skip to content

Commit

Permalink
fix: type error on React 18
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter committed Oct 6, 2022
1 parent 3c23244 commit f3ef503
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions components/badge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface BadgeProps extends WithThemeStyles<BadgeStyle> {
corner?: boolean
dot?: boolean
text?: any
children?: React.ReactNode
}

export default class Badge extends React.Component<BadgeProps, any> {
Expand Down
9 changes: 5 additions & 4 deletions components/modal/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from 'react'
import {
KeyboardAvoidingView,
Platform,
StyleProp,
Text,
TextStyle,
TouchableHighlight,
TouchableWithoutFeedback,
View,
ViewStyle,
KeyboardAvoidingView,
Platform,
ViewStyle
} from 'react-native'
import { LocaleContext } from '../locale-provider'
import { WithTheme, WithThemeStyles } from '../style'
import { getComponentLocale } from '../_util/getLocale'
import alert from './alert'
Expand All @@ -19,14 +20,14 @@ import operation from './operation'
import prompt from './prompt'
import { CallbackOnBackHandler, ModalPropsType } from './PropsType'
import modalStyles, { ModalStyle } from './style/index'
import { LocaleContext } from '../locale-provider'

export interface ModalProps
extends ModalPropsType<TextStyle>,
WithThemeStyles<ModalStyle> {
style?: StyleProp<ViewStyle>
bodyStyle?: StyleProp<ViewStyle>
onRequestClose?: CallbackOnBackHandler
children: React.ReactNode
}

class AntmModal extends React.Component<ModalProps, any> {
Expand Down
1 change: 1 addition & 0 deletions components/wing-blank/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { WithTheme } from '../style'
export interface WingBlankProps {
style?: StyleProp<ViewStyle>
size?: 'sm' | 'md' | 'lg'
children: React.ReactNode
}
class WingBlank extends React.Component<WingBlankProps, any> {
static defaultProps = {
Expand Down

0 comments on commit f3ef503

Please sign in to comment.