feat: Introduce Alerts, Clips, and Settings tabs, update theme colors, and enhance ThemedView, ThemedText, and IconSymbol components.
This commit is contained in:
@@ -5,7 +5,7 @@ import { useThemeColor } from '@/hooks/use-theme-color';
|
||||
export type ThemedTextProps = TextProps & {
|
||||
lightColor?: string;
|
||||
darkColor?: string;
|
||||
type?: 'default' | 'title' | 'defaultSemiBold' | 'subtitle' | 'link';
|
||||
type?: 'default' | 'title' | 'defaultSemiBold' | 'subtitle' | 'link' | 'secondary';
|
||||
};
|
||||
|
||||
export function ThemedText({
|
||||
@@ -15,7 +15,10 @@ export function ThemedText({
|
||||
type = 'default',
|
||||
...rest
|
||||
}: ThemedTextProps) {
|
||||
const color = useThemeColor({ light: lightColor, dark: darkColor }, 'text');
|
||||
const color = useThemeColor(
|
||||
{ light: lightColor, dark: darkColor },
|
||||
type === 'secondary' ? 'textSecondary' : 'text'
|
||||
);
|
||||
|
||||
return (
|
||||
<Text
|
||||
@@ -26,6 +29,7 @@ export function ThemedText({
|
||||
type === 'defaultSemiBold' ? styles.defaultSemiBold : undefined,
|
||||
type === 'subtitle' ? styles.subtitle : undefined,
|
||||
type === 'link' ? styles.link : undefined,
|
||||
type === 'secondary' ? styles.secondary : undefined,
|
||||
style,
|
||||
]}
|
||||
{...rest}
|
||||
@@ -55,6 +59,10 @@ const styles = StyleSheet.create({
|
||||
link: {
|
||||
lineHeight: 30,
|
||||
fontSize: 16,
|
||||
color: '#0a7ea4',
|
||||
color: '#635bff', // Stripe blurple
|
||||
},
|
||||
secondary: {
|
||||
fontSize: 14,
|
||||
lineHeight: 22,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -5,10 +5,11 @@ import { useThemeColor } from '@/hooks/use-theme-color';
|
||||
export type ThemedViewProps = ViewProps & {
|
||||
lightColor?: string;
|
||||
darkColor?: string;
|
||||
variant?: 'default' | 'card';
|
||||
};
|
||||
|
||||
export function ThemedView({ style, lightColor, darkColor, ...otherProps }: ThemedViewProps) {
|
||||
const backgroundColor = useThemeColor({ light: lightColor, dark: darkColor }, 'background');
|
||||
export function ThemedView({ style, lightColor, darkColor, variant = 'default', ...otherProps }: ThemedViewProps) {
|
||||
const backgroundColor = useThemeColor({ light: lightColor, dark: darkColor }, variant === 'card' ? 'card' : 'background');
|
||||
|
||||
return <View style={[{ backgroundColor }, style]} {...otherProps} />;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Fallback for using MaterialIcons on Android and web.
|
||||
|
||||
import MaterialIcons from '@expo/vector-icons/MaterialIcons';
|
||||
import { SymbolWeight, SymbolViewProps } from 'expo-symbols';
|
||||
import { SymbolViewProps, SymbolWeight } from 'expo-symbols';
|
||||
import { ComponentProps } from 'react';
|
||||
import { OpaqueColorValue, type StyleProp, type TextStyle } from 'react-native';
|
||||
|
||||
@@ -18,6 +18,9 @@ const MAPPING = {
|
||||
'paperplane.fill': 'send',
|
||||
'chevron.left.forwardslash.chevron.right': 'code',
|
||||
'chevron.right': 'chevron-right',
|
||||
'bell.fill': 'notifications',
|
||||
'film.fill': 'video-library',
|
||||
'gearshape.fill': 'settings',
|
||||
} as IconMapping;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user