Files
mindfulness/client/components/onboarding/SerifText.tsx
2026-01-29 19:09:36 +08:00

31 lines
714 B
TypeScript

import React from 'react';
import { Text, TextProps, Platform, StyleSheet } from 'react-native';
import { OnboardingColors } from '@/constants/OnboardingTheme';
interface SerifTextProps extends TextProps {
weight?: 'regular' | 'bold';
}
export function SerifText({ style, weight = 'regular', ...otherProps }: SerifTextProps) {
return (
<Text
style={[
styles.text,
weight === 'bold' && styles.bold,
style,
]}
{...otherProps}
/>
);
}
const styles = StyleSheet.create({
text: {
fontFamily: Platform.select({ ios: 'Georgia', android: 'serif', default: 'serif' }),
color: OnboardingColors.textPrimary,
},
bold: {
fontWeight: 'bold',
},
});