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

[TS migration] Migrate 'HeaderGap' component to TypeScript #7

Closed
wants to merge 6 commits into from
Closed
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
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ module.exports = {
'rulesdir/prefer-underscore-method': 'off',
'rulesdir/prefer-import-module-contents': 'off',
'react/require-default-props': 'off',
'react/prop-types': 'off',
'no-restricted-syntax': [
'error',
{
Expand Down
25 changes: 0 additions & 25 deletions src/components/HeaderGap/index.desktop.js

This file was deleted.

13 changes: 13 additions & 0 deletions src/components/HeaderGap/index.desktop.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React, {memo} from 'react';
import {View} from 'react-native';
import useThemeStyles from '@styles/useThemeStyles';
import HeaderGapProps from './types';

function HeaderGap({styles}: HeaderGapProps) {
const themeStyles = useThemeStyles();
return <View style={[themeStyles.headerGap, styles]} />;
}

HeaderGap.displayName = 'HeaderGap';

export default memo(HeaderGap);
6 changes: 0 additions & 6 deletions src/components/HeaderGap/index.js

This file was deleted.

11 changes: 11 additions & 0 deletions src/components/HeaderGap/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {ReactNode} from 'react';
import HeaderGapProps from './types';

// eslint-disable-next-line @typescript-eslint/no-unused-vars
function HeaderGap({styles}: HeaderGapProps): ReactNode {
return null;
}

HeaderGap.displayName = 'HeaderGap';

export default HeaderGap;
7 changes: 7 additions & 0 deletions src/components/HeaderGap/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {StyleProp, ViewStyle} from 'react-native';

type HeaderGapProps = {
styles?: StyleProp<ViewStyle>;
};

export default HeaderGapProps;
Loading