Skip to content

Commit

Permalink
Merge pull request #25886 from pasyukevich/migration-ts/card-styles
Browse files Browse the repository at this point in the history
[No QA] [TS migration] Migrate 'cardStyles' style to TypeScript
  • Loading branch information
srikarparsi authored Sep 13, 2023
2 parents 67f9f77 + 76ffe96 commit 0df67e1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
12 changes: 0 additions & 12 deletions src/styles/cardStyles/index.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/styles/cardStyles/index.native.js

This file was deleted.

5 changes: 5 additions & 0 deletions src/styles/cardStyles/index.native.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import GetCardStyles from './types';

const getCardStyles: GetCardStyles = () => ({});

export default getCardStyles;
12 changes: 12 additions & 0 deletions src/styles/cardStyles/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import GetCardStyles from './types';

/**
* Get card style for cardStyleInterpolator
*/
const getCardStyles: GetCardStyles = (screenWidth) => ({
position: 'fixed',
width: screenWidth,
height: '100%',
});

export default getCardStyles;
6 changes: 6 additions & 0 deletions src/styles/cardStyles/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import {CSSProperties} from 'react';
import {ViewStyle} from 'react-native';

type GetCardStyles = (screenWidth: number) => Partial<Pick<CSSProperties | ViewStyle, 'position' | 'width' | 'height'>>;

export default GetCardStyles;

0 comments on commit 0df67e1

Please sign in to comment.