Skip to content

Commit

Permalink
create common types.ts type
Browse files Browse the repository at this point in the history
  • Loading branch information
JKobrynski committed Oct 26, 2023
1 parent 134318a commit a727d54
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/components/KeyboardAvoidingView/index.ios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
* The KeyboardAvoidingView is only used on ios
*/
import React from 'react';
import {KeyboardAvoidingView as KeyboardAvoidingViewComponent, KeyboardAvoidingViewProps} from 'react-native';
import {KeyboardAvoidingView as KeyboardAvoidingViewComponent} from 'react-native';
import Props from './types';

function KeyboardAvoidingView(props: KeyboardAvoidingViewProps) {
function KeyboardAvoidingView(props: Props) {
// eslint-disable-next-line react/jsx-props-no-spreading
return <KeyboardAvoidingViewComponent {...props} />;
}
Expand Down
5 changes: 3 additions & 2 deletions src/components/KeyboardAvoidingView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
* The KeyboardAvoidingView is only used on ios
*/
import React from 'react';
import {KeyboardAvoidingViewProps, View} from 'react-native';
import {View} from 'react-native';
import Props from './types';

function KeyboardAvoidingView(props: KeyboardAvoidingViewProps) {
function KeyboardAvoidingView(props: Props) {
const {behavior, contentContainerStyle, enabled, keyboardVerticalOffset, ...rest} = props;
return (
// eslint-disable-next-line react/jsx-props-no-spreading
Expand Down
3 changes: 3 additions & 0 deletions src/components/KeyboardAvoidingView/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {KeyboardAvoidingViewProps} from 'react-native';

export default KeyboardAvoidingViewProps;

0 comments on commit a727d54

Please sign in to comment.