Skip to content

Commit b669f7b

Browse files
committed
used platform files for platform specfic code
1 parent 49f5ddd commit b669f7b

4 files changed

Lines changed: 18 additions & 8 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import colors from '@styles/theme/colors';
2+
3+
function getSplashBackgroundColor() {
4+
return colors.green400;
5+
}
6+
7+
export default getSplashBackgroundColor;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import colors from '@styles/theme/colors';
2+
3+
function getSplashBackgroundColor() {
4+
return colors.productDark100;
5+
}
6+
7+
export default getSplashBackgroundColor;

src/styles/theme/themes/dark.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
import getPlatform from '@libs/getPlatform';
1+
import getSplashBackgroundColor from '@libs/getSplashBackgroundColor';
22
import colors from '@styles/theme/colors';
33
import type {ThemeColors} from '@styles/theme/types';
44
import CONST from '@src/CONST';
55
import SCREENS from '@src/SCREENS';
66

7-
const platform = getPlatform();
8-
97
const darkTheme = {
108
// Figma keys
119
appBG: colors.productDark100,
12-
splashBG: platform === CONST.PLATFORM.WEB || platform === CONST.PLATFORM.IOS ? colors.productDark100 : colors.green400,
10+
splashBG: getSplashBackgroundColor(),
1311
highlightBG: colors.productDark200,
1412
border: colors.productDark400,
1513
borderLighter: colors.productDark400,

src/styles/theme/themes/light.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
import getPlatform from '@libs/getPlatform';
1+
import getSplashBackgroundColor from '@libs/getSplashBackgroundColor';
22
import colors from '@styles/theme/colors';
33
import type {ThemeColors} from '@styles/theme/types';
44
import CONST from '@src/CONST';
55
import SCREENS from '@src/SCREENS';
66

7-
const platform = getPlatform();
8-
97
const lightTheme = {
108
// Figma keys
119
appBG: colors.productLight100,
12-
splashBG: platform === CONST.PLATFORM.WEB || platform === CONST.PLATFORM.DESKTOP ? colors.productDark100 : colors.green400,
10+
splashBG: getSplashBackgroundColor(),
1311
highlightBG: colors.productLight200,
1412
border: colors.productLight400,
1513
borderLighter: colors.productLight400,

0 commit comments

Comments
 (0)