Skip to content

Commit 5ffd608

Browse files
committed
feat: Refactor theme imports and enhance theme accessibility across components
1 parent 66dd38f commit 5ffd608

File tree

6 files changed

+21
-5
lines changed

6 files changed

+21
-5
lines changed

frontend/components/core/Button.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import * as Haptics from 'expo-haptics';
55
import { LinearGradient } from 'expo-linear-gradient';
66
import { ActivityIndicator, Text, TouchableOpacity, View } from 'react-native';
7-
import { borderRadius, colors, shadows, spacing } from '../../utils/theme';
7+
import theme, { borderRadius, colors, shadows, spacing } from '../../utils/theme';
88

99
const Button = ({
1010
title,
@@ -179,3 +179,4 @@ const Button = ({
179179
};
180180

181181
export default Button;
182+
export { Button as ModernButton };

frontend/components/core/Input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
TouchableOpacity,
1111
View
1212
} from 'react-native';
13-
import { animations, borderRadius, colors, spacing, typography } from '../../utils/theme';
13+
import theme, { animations, borderRadius, colors, spacing, typography } from '../../utils/theme';
1414

1515
const EnhancedTextInput = ({
1616
label,

frontend/components/navigation/ModernNavigation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
TouchableOpacity,
1010
View
1111
} from 'react-native';
12-
import {
12+
import theme, {
1313
colors,
1414
shadows,
1515
spacing,

frontend/screens/HomeScreen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import Button from '../components/core/Button';
2929
import { EnhancedTextInput } from '../components/core/Input';
3030
import { FloatingActionButton, ModernHeader } from '../components/navigation/ModernNavigation';
3131
import { GlassCard, GroupSummaryCard, QuickActionCard } from '../utils/cards';
32-
import { borderRadius, colors, spacing, typography } from '../utils/theme';
32+
import theme, { borderRadius, colors, spacing, typography } from '../utils/theme';
3333

3434
const { width, height } = Dimensions.get('window');
3535

frontend/utils/cards.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
TouchableOpacity,
1212
View
1313
} from 'react-native';
14-
import {
14+
import theme, {
1515
borderRadius,
1616
colors,
1717
shadows,

frontend/utils/theme.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,18 @@ export const paperTheme = {
269269
},
270270
roundness: borderRadius.md,
271271
};
272+
273+
// Default export for convenient theme access
274+
export const theme = {
275+
colors,
276+
spacing,
277+
borderRadius,
278+
typography,
279+
shadows,
280+
animations,
281+
glassmorphism,
282+
paperTheme,
283+
tokens,
284+
};
285+
286+
export default theme;

0 commit comments

Comments
 (0)