@@ -10,44 +10,50 @@ export const useAppTheme = () => {
1010 return {
1111 theme,
1212 // Utility functions for common styling patterns
13- borderRadius : theme . custom . borderRadius ,
14- spacing : theme . custom . spacing ,
13+ borderRadius : theme ? .custom ? .borderRadius || 8 ,
14+ spacing : theme ? .custom ? .spacing || { xs : 4 , sm : 8 , md : 16 , lg : 24 , xl : 32 } ,
1515
1616 // Common container styles with modern design
1717 getCardStyle : ( customStyles = { } ) => ( {
18- borderRadius : theme . custom . borderRadius ,
19- backgroundColor : theme . colors . surface ,
20- ...theme . custom . shadow . small ,
18+ borderRadius : theme ?. custom ?. borderRadius || 8 ,
19+ backgroundColor : theme ?. colors ?. surface || '#ffffff' ,
20+ shadowOffset : { width : 0 , height : 1 } ,
21+ shadowOpacity : 0.05 ,
22+ shadowRadius : 2 ,
23+ elevation : 1 ,
2124 ...customStyles ,
2225 } ) ,
2326
2427 getModalStyle : ( customStyles = { } ) => ( {
25- backgroundColor : theme . colors . surface ,
26- padding : theme . custom . spacing . lg ,
27- margin : theme . custom . spacing . lg ,
28- borderRadius : theme . custom . borderRadiusLarge , // Use larger radius only for modals
29- ...theme . custom . shadow . medium ,
28+ backgroundColor : theme ?. colors ?. surface || '#ffffff' ,
29+ padding : theme ?. custom ?. spacing ?. lg || 24 ,
30+ margin : theme ?. custom ?. spacing ?. lg || 24 ,
31+ borderRadius : theme ?. custom ?. borderRadiusLarge || 12 , // Use larger radius only for modals
32+ shadowOffset : { width : 0 , height : 2 } ,
33+ shadowOpacity : 0.08 ,
34+ shadowRadius : 8 ,
35+ elevation : 3 ,
3036 ...customStyles ,
3137 } ) ,
3238
3339 getSectionStyle : ( backgroundColor , borderColor , customStyles = { } ) => ( {
34- backgroundColor : backgroundColor || theme . colors . surfaceVariant ,
35- borderRadius : theme . custom . borderRadius ,
36- padding : theme . custom . spacing . md ,
40+ backgroundColor : backgroundColor || theme ? .colors ? .surfaceVariant || '#f5f5f7' ,
41+ borderRadius : theme ? .custom ? .borderRadius || 8 ,
42+ padding : theme ? .custom ? .spacing ? .md || 16 ,
3743 borderLeftWidth : 3 , // Reduced from 4 for more subtle accent
3844 borderLeftColor : borderColor ,
3945 ...customStyles ,
4046 } ) ,
4147
4248 // Modern input styles
4349 getInputStyle : ( customStyles = { } ) => ( {
44- backgroundColor : theme . colors . surface ,
50+ backgroundColor : theme ? .colors ? .surface || '#ffffff' ,
4551 ...customStyles ,
4652 } ) ,
4753
4854 // Clean button styles
4955 getButtonStyle : ( variant = 'contained' , customStyles = { } ) => ( {
50- borderRadius : theme . custom . borderRadius ,
56+ borderRadius : theme ? .custom ? .borderRadius || 8 ,
5157 ...customStyles ,
5258 } ) ,
5359 } ;
0 commit comments