Skip to content

Commit

Permalink
feat: add use dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
daehyeonmun2021 committed Sep 5, 2023
1 parent 861f499 commit 4ca4821
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './use-dimensions';
1 change: 1 addition & 0 deletions src/hooks/use-dimensions/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './use-dimensions';
10 changes: 10 additions & 0 deletions src/hooks/use-dimensions/use-dimensions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Dimensions } from 'react-native';

const { width: windowWidth, height: windowHeight } = Dimensions.get('window');

export const useDimensions = () => {
return {
windowWidth,
windowHeight,
};
};

0 comments on commit 4ca4821

Please sign in to comment.