Skip to content

Commit

Permalink
Merge pull request #26158 from software-mansion-labs/ts-migration/sho…
Browse files Browse the repository at this point in the history
…uld-render-offscreen

[No QA] [TS migration] Migrate 'shouldRenderOffscreen' lib to TypeScript
  • Loading branch information
youssef-lr authored Sep 11, 2023
2 parents 67df8e9 + 184d221 commit 6cdefbe
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/libs/shouldRenderOffscreen/index.android.js

This file was deleted.

6 changes: 6 additions & 0 deletions src/libs/shouldRenderOffscreen/index.android.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import ShouldRenderOffscreen from './types';

// Rendering offscreen on Android allows it to apply opacity to stacked components correctly.
const shouldRenderOffscreen: ShouldRenderOffscreen = true;

export default shouldRenderOffscreen;
1 change: 0 additions & 1 deletion src/libs/shouldRenderOffscreen/index.js

This file was deleted.

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

const shouldRenderOffscreen: ShouldRenderOffscreen = false;

export default shouldRenderOffscreen;
3 changes: 3 additions & 0 deletions src/libs/shouldRenderOffscreen/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type ShouldRenderOffscreen = boolean;

export default ShouldRenderOffscreen;

0 comments on commit 6cdefbe

Please sign in to comment.