Skip to content

Commit 3aab280

Browse files
committed
refactor: standardize shadow properties and background colors across components for improved consistency
1 parent b8e44a1 commit 3aab280

20 files changed

+44
-294
lines changed

MobileApp/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function AppContent(): React.JSX.Element {
5151
borderRadius: 999,
5252
}}
5353
/>
54-
<StatusBar style={theme.isDark ? "light" : "dark"} />
54+
<StatusBar style="light" />
5555
<RootNavigator />
5656
<OfflineBanner />
5757
</View>

MobileApp/src/components/AddNoteModal.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ export default function AddNoteModal({
6262
borderTopRightRadius: 24,
6363
padding: 20,
6464
paddingBottom: 36,
65-
backgroundColor: theme.isDark
66-
? theme.colors.backgroundElevated
67-
: theme.colors.backgroundPrimary,
65+
backgroundColor: theme.colors.backgroundElevated,
6866
borderWidth: 1,
6967
borderBottomWidth: 0,
7068
borderColor: theme.colors.borderGlass,

MobileApp/src/components/AlertCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ export default function AlertCard({
5151
backgroundColor: theme.colors.backgroundElevated,
5252
borderWidth: 1,
5353
borderColor: theme.colors.borderGlass,
54-
shadowColor: theme.isDark ? "#000" : "#111827",
55-
shadowOpacity: theme.isDark ? 0.22 : 0.08,
54+
shadowColor: "#000",
55+
shadowOpacity: 0.22,
5656
shadowOffset: { width: 0, height: 8 },
5757
shadowRadius: 14,
5858
elevation: 5,

MobileApp/src/components/EpisodeCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ export default function EpisodeCard(
7979
backgroundColor: theme.colors.backgroundElevated,
8080
borderWidth: 1,
8181
borderColor: theme.colors.borderGlass,
82-
shadowColor: theme.isDark ? "#000" : "#111827",
83-
shadowOpacity: theme.isDark ? 0.22 : 0.08,
82+
shadowColor: "#000",
83+
shadowOpacity: 0.22,
8484
shadowOffset: { width: 0, height: 8 },
8585
shadowRadius: 14,
8686
elevation: 5,

MobileApp/src/components/GradientButton.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ export default function GradientButton({
2929
style,
3030
}: GradientButtonProps): React.JSX.Element {
3131
const { theme } = useTheme();
32-
const primaryContentColor: string = theme.isDark
33-
? theme.colors.backgroundPrimary
34-
: "#FFFFFF";
32+
const primaryContentColor: string = theme.colors.backgroundPrimary;
3533

3634
const isDisabled: boolean = disabled || loading;
3735

MobileApp/src/components/IncidentCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export default function IncidentCard({
5959
backgroundColor: theme.colors.backgroundElevated,
6060
borderWidth: 1,
6161
borderColor: theme.colors.borderGlass,
62-
shadowColor: theme.isDark ? "#000" : "#111827",
63-
shadowOpacity: theme.isDark ? 0.22 : 0.08,
62+
shadowColor: "#000",
63+
shadowOpacity: 0.22,
6464
shadowOffset: { width: 0, height: 8 },
6565
shadowRadius: 14,
6666
elevation: 5,

MobileApp/src/components/NotesSection.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ export default function NotesSection({
5555
borderRadius: 8,
5656
paddingHorizontal: 12,
5757
paddingVertical: 6,
58-
backgroundColor: theme.isDark
59-
? theme.colors.accentGradientStart
60-
: theme.colors.actionPrimary,
58+
backgroundColor: theme.colors.accentGradientStart,
6159
opacity: pressed ? 0.85 : 1,
6260
};
6361
}}
@@ -98,10 +96,8 @@ export default function NotesSection({
9896
backgroundColor: theme.colors.backgroundElevated,
9997
borderWidth: 1,
10098
borderColor: theme.colors.borderGlass,
101-
shadowColor: theme.isDark
102-
? "#000"
103-
: theme.colors.accentGradientMid,
104-
shadowOpacity: theme.isDark ? 0.16 : 0.06,
99+
shadowColor: "#000",
100+
shadowOpacity: 0.16,
105101
shadowOffset: { width: 0, height: 5 },
106102
shadowRadius: 10,
107103
elevation: 3,

MobileApp/src/components/SegmentedControl.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ export default function SegmentedControl<T extends string>({
1919
onSelect,
2020
}: SegmentedControlProps<T>): React.JSX.Element {
2121
const { theme } = useTheme();
22-
const activeContentColor: string = theme.isDark
23-
? theme.colors.backgroundPrimary
24-
: "#FFFFFF";
22+
const activeContentColor: string = theme.colors.backgroundPrimary;
2523

2624
return (
2725
<View

MobileApp/src/navigation/MainTabNavigator.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@ export default function MainTabNavigator(): React.JSX.Element {
7777
height: Platform.OS === "ios" ? 78 : 68,
7878
paddingBottom: Platform.OS === "ios" ? 18 : 10,
7979
paddingTop: 10,
80-
shadowColor: theme.isDark
81-
? "#000000"
82-
: theme.colors.accentGradientMid,
83-
shadowOpacity: theme.isDark ? 0.35 : 0.12,
80+
shadowColor: "#000000",
81+
shadowOpacity: 0.35,
8482
shadowOffset: { width: 0, height: 8 },
8583
shadowRadius: 18,
8684
elevation: 16,

MobileApp/src/navigation/RootNavigator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default function RootNavigator(): React.JSX.Element {
7474

7575
const navigationTheme: Theme = {
7676
...DefaultTheme,
77-
dark: theme.isDark,
77+
dark: true,
7878
colors: {
7979
...DefaultTheme.colors,
8080
primary: theme.colors.actionPrimary,

0 commit comments

Comments
 (0)