/* eslint react/prop-types: "off", react-native/no-inline-styles: "off" */ import React, { forwardRef } from 'react'; import { Dimensions, Platform, Pressable, StyleSheet, TextInput, View } from 'react-native'; import { Icon, Text } from '@rneui/themed'; import { useTheme } from './components/themes'; import { useLocale } from '@react-navigation/native'; const { height, width } = Dimensions.get('window'); const aspectRatio = height / width; let isIpad; if (aspectRatio > 1.6) { isIpad = false; } else { isIpad = true; } /** * TODO: remove this comment once this file gets properly converted to typescript. * * @type {React.FC} */ export const BlueButtonLink = forwardRef((props, ref) => { const { colors } = useTheme(); return ( [styles.blueButtonLink, pressed && styles.pressed]} {...props} ref={ref}> {props.title} ); }); export const BlueCard = props => { return ; }; export const BlueText = ({ bold = false, ...props }) => { const { colors } = useTheme(); const { direction } = useLocale(); const style = StyleSheet.compose( { color: colors.foregroundColor, writingDirection: direction, fontWeight: bold ? 'bold' : 'normal', }, props.style, ); return ; }; export const BlueTextCentered = props => { const { colors } = useTheme(); return ; }; export const BlueFormLabel = props => { const { colors } = useTheme(); const { direction } = useLocale(); return ( ); }; export const BlueFormMultiInput = props => { const { colors } = useTheme(); return ( ); }; export class is { static ipad() { return isIpad; } } export function BlueBigCheckmark({ style = {} }) { const defaultStyles = { backgroundColor: '#ccddf9', width: 120, height: 120, borderRadius: 60, alignSelf: 'center', justifyContent: 'center', marginTop: 0, marginBottom: 0, }; const mergedStyles = { ...defaultStyles, ...style }; return ( ); } const styles = StyleSheet.create({ blueButtonLink: { minWidth: 100, minHeight: 36, justifyContent: 'center', }, pressed: { opacity: 0.6, }, });