Files
X-Financial/mobile/app/src/constants/theme.ts

81 lines
1.7 KiB
TypeScript
Raw Normal View History

import '@/global.css';
import { Platform } from 'react-native';
export const Colors = {
light: {
text: '#071124',
background: '#F7FAFC',
backgroundElement: '#FFFFFF',
backgroundSelected: '#DFF8EC',
textSecondary: '#58677F',
primary: '#059669',
primarySoft: '#EFFCF6',
border: '#DBE5EF',
warning: '#F59E0B',
danger: '#EF4444',
info: '#2563EB',
},
dark: {
text: '#ffffff',
background: '#071124',
backgroundElement: '#111C2F',
backgroundSelected: '#143B35',
textSecondary: '#B0B8C8',
primary: '#34D399',
primarySoft: '#0F2F2A',
border: '#26364E',
warning: '#FBBF24',
danger: '#F87171',
info: '#60A5FA',
},
} as const;
export type ThemeColor = keyof typeof Colors.light & keyof typeof Colors.dark;
export const Fonts = Platform.select({
ios: {
/** iOS `UIFontDescriptorSystemDesignDefault` */
sans: 'system-ui',
/** iOS `UIFontDescriptorSystemDesignSerif` */
serif: 'ui-serif',
/** iOS `UIFontDescriptorSystemDesignRounded` */
rounded: 'ui-rounded',
/** iOS `UIFontDescriptorSystemDesignMonospaced` */
mono: 'ui-monospace',
},
default: {
sans: 'normal',
serif: 'serif',
rounded: 'normal',
mono: 'monospace',
},
web: {
sans: 'var(--font-display)',
serif: 'var(--font-serif)',
rounded: 'var(--font-rounded)',
mono: 'var(--font-mono)',
},
});
export const Spacing = {
half: 2,
one: 4,
two: 8,
three: 12,
four: 16,
five: 24,
six: 32,
seven: 48,
} as const;
export const Radius = {
sm: 6,
md: 8,
lg: 12,
pill: 999,
} as const;
export const BottomTabInset = Platform.select({ ios: 54, android: 76 }) ?? 0;
export const MaxContentWidth = 800;