Fixing redesign-settings prettier & lint => CI

This commit is contained in:
mathysPaul
2023-09-19 18:23:31 +02:00
parent 1abfbf391f
commit c4ca2e509e
18 changed files with 35 additions and 196 deletions
+3 -4
View File
@@ -1,13 +1,12 @@
import React, { useRef, useState } from 'react';
import React, { useState } from 'react';
import { ElementProps } from './ElementTypes';
import { RawElement } from './RawElement';
import { Pressable, IPressableProps, View, Text, Wrap, Column } from 'native-base';
import { Animated, StyleSheet } from 'react-native';
import { View, Column } from 'native-base';
import { StyleSheet } from 'react-native';
import InteractiveBase from '../UI/InteractiveBase';
export const Element = <T extends ElementProps>(props: T) => {
let actionFunction: (() => void) | null | undefined = null;
const dropdownAnimator = useRef(new Animated.Value(1)).current;
const [dropdownValue, setDropdownValue] = useState(false);
switch (props.type) {
-6
View File
@@ -1,12 +1,8 @@
import React from 'react';
import { StyleProp, ViewStyle } from 'react-native';
import { Element } from './Element';
import useColorScheme from '../../hooks/colorScheme';
import { ElementProps } from './ElementTypes';
import { Box, Column, Divider } from 'native-base';
import InteractiveBase from '../UI/InteractiveBase';
import { StyleSheet } from 'react-native';
type ElementListProps = {
elements: ElementProps[];
@@ -14,8 +10,6 @@ type ElementListProps = {
};
const ElementList = ({ elements, style }: ElementListProps) => {
const colorScheme = useColorScheme();
// const isDark = colorScheme === 'dark';
const elementStyle = {
borderRadius: 10,
shadowOpacity: 0.3,
+1 -1
View File
@@ -1,4 +1,4 @@
import { Select, Switch, Text, Icon, Row, Slider, Box } from 'native-base';
import { Select, Switch, Text, Icon, Row, Slider } from 'native-base';
import { MaterialIcons } from '@expo/vector-icons';
import { useWindowDimensions } from 'react-native';
+1 -14
View File
@@ -1,16 +1,5 @@
import React from 'react';
import {
Box,
Button,
Column,
Icon,
Popover,
Row,
Text,
Wrap,
useBreakpointValue,
} from 'native-base';
import useColorScheme from '../../hooks/colorScheme';
import { Box, Button, Column, Icon, Popover, Row, Text, useBreakpointValue } from 'native-base';
import { Ionicons } from '@expo/vector-icons';
import { ElementProps } from './ElementTypes';
import {
@@ -27,8 +16,6 @@ type RawElementProps = {
export const RawElement = ({ element }: RawElementProps) => {
const { title, icon, type, helperText, description, disabled, data } = element;
const colorScheme = useColorScheme();
const isDark = colorScheme === 'dark';
const screenSize = useBreakpointValue({ base: 'small', md: 'big' });
const isSmallScreen = screenSize === 'small';
return (
+1 -5
View File
@@ -1,18 +1,15 @@
import React, { useState } from 'react';
import { StyleSheet, ActivityIndicator, View, Image, StyleProp, ViewStyle } from 'react-native';
import Ionicons from '@expo/vector-icons/Ionicons';
import InteractiveBase from './InteractiveBase';
import { Text, useTheme } from 'native-base';
// import { BlurView } from 'expo-blur';
interface ButtonProps {
title?: string;
style?: StyleProp<ViewStyle>;
onPress?: () => Promise<any>;
onPress?: () => Promise<void>;
isDisabled?: boolean;
icon?: (size: string, color: string) => React.ReactNode;
iconImage?: string;
isCollapsed?: boolean;
type: 'filled' | 'outlined' | 'menu';
}
@@ -23,7 +20,6 @@ const ButtonBase: React.FC<ButtonProps> = ({
isDisabled,
icon,
iconImage,
isCollapsed,
type = 'filled',
}) => {
const { colors } = useTheme();
+2 -2
View File
@@ -4,7 +4,7 @@ import { Animated, StyleSheet, StyleProp, ViewStyle } from 'react-native';
interface InteractiveBaseProps {
children?: React.ReactNode;
onPress?: () => Promise<any>;
onPress?: () => Promise<void>;
isDisabled?: boolean;
isOutlined?: boolean;
style?: StyleProp<ViewStyle>;
@@ -229,7 +229,7 @@ const InteractiveBase: React.FC<InteractiveBaseProps> = ({
shadowOpacity: shadowOpacityValue,
shadowRadius: shadowRadiusValue,
elevation: elevationValue,
},
},
]}
>
<Pressable
+4 -6
View File
@@ -1,15 +1,13 @@
import React, { useState } from 'react';
import { StyleSheet, ActivityIndicator, View, Image } from 'react-native';
// import Ionicons from '@expo/vector-icons/Ionicons';
import React from 'react';
import { StyleSheet, View } from 'react-native';
import InteractiveBase from './InteractiveBase';
import { Text, useTheme } from 'native-base';
// import { BlurView } from 'expo-blur';
import { Text } from 'native-base';
interface SettingProps {
icon: (size: number, color: string) => React.ReactNode;
title: string;
description?: string;
onPress?: () => Promise<any>;
onPress?: () => Promise<void>;
children?: React.ReactNode;
}
+1 -1
View File
@@ -1,5 +1,5 @@
import { Eye, EyeSlash } from 'iconsax-react-native';
import React, { useState, useEffect } from 'react';
import React, { useState } from 'react';
import { View, TouchableOpacity, StyleSheet, StyleProp, ViewStyle } from 'react-native';
import InteractiveBase from './InteractiveBase';
import { Input } from 'native-base';
+1 -10
View File
@@ -1,16 +1,7 @@
import React from 'react';
import { translate } from '../../i18n/i18n';
import { string } from 'yup';
import {
FormControl,
Input,
Stack,
WarningOutlineIcon,
Box,
Button,
useToast,
Flex,
} from 'native-base';
import { useToast, Flex } from 'native-base';
import TextFormField from '../UI/TextFormField';
import ButtonBase from '../UI/ButtonBase';
import { Sms } from 'iconsax-react-native';
+1 -10
View File
@@ -1,16 +1,7 @@
import React from 'react';
import { translate } from '../../i18n/i18n';
import { string } from 'yup';
import {
FormControl,
Input,
Stack,
WarningOutlineIcon,
Box,
Button,
useToast,
Flex,
} from 'native-base';
import { useToast, Flex } from 'native-base';
import TextFormField from '../UI/TextFormField';
import { Lock1 } from 'iconsax-react-native';
import ButtonBase from '../UI/ButtonBase';