Skip to content

Commit

Permalink
migrate 'cardStyles' to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
pasyukevich committed Sep 12, 2023
1 parent 2163c54 commit 76ffe96
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 76ffe96

Please sign in to comment.