diff --git a/front/components/UI/InteractiveBase.tsx b/front/components/UI/InteractiveBase.tsx index 8dddbf7..93f00e0 100644 --- a/front/components/UI/InteractiveBase.tsx +++ b/front/components/UI/InteractiveBase.tsx @@ -1,13 +1,8 @@ import React, { useRef, useState } from 'react'; import { Animated, StyleSheet, TouchableOpacity, ActivityIndicator, View, Image, StyleProp, ViewStyle } from 'react-native'; -import Ionicons from '@expo/vector-icons/Ionicons'; -import { Text, useTheme } from 'native-base' -import { BlurView } from 'expo-blur'; - -import { - Fill, - BackdropBlur, -} from "@shopify/react-native-skia"; +// import Ionicons from '@expo/vector-icons/Ionicons'; +// import { Text, useTheme } from 'native-base' +// import { BlurView } from '@react-native-community/blur'; interface InteractiveBaseProps { children?: React.ReactNode; @@ -200,7 +195,7 @@ const InteractiveBase: React.FC = ({ children, onPress, st style={[ style, isDisabled ? styleAnimate.Disabled : { - backgroundColor: isOutlined ? 'transparent' : backgroundColorValue, + backgroundColor: isOutlined ? 'rgba(0,0,0,0.3)' : backgroundColorValue, borderColor: isOutlined ? backgroundColorValue : 'transparent', borderWidth: 2, transform: [{ scale: scaleValue }], @@ -219,17 +214,19 @@ const InteractiveBase: React.FC = ({ children, onPress, st onMouseLeave={handleMouseLeave} style={styles.container} > - {/* - {children} - */} {children} - - - + {/* */} ); diff --git a/front/components/UI/SettingsBase.tsx b/front/components/UI/SettingsBase.tsx new file mode 100644 index 0000000..9142f24 --- /dev/null +++ b/front/components/UI/SettingsBase.tsx @@ -0,0 +1,98 @@ +import React, { useState } from 'react'; +import { StyleSheet, ActivityIndicator, View, Image } 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 SettingProps { + icon: string; + title: string; + description?: string; + onPress?: () => Promise; + children?: React.ReactNode; +} + +const SettingBase: React.FC = ({ title, description, onPress, icon, children}) => { + const styleSetting = StyleSheet.create({ + Default: { + scale: 1, + shadowOpacity: 0.30, + shadowRadius: 4.65, + elevation: 8, + backgroundColor: 'rgba(16, 16, 20, 0.50)', + }, + onHover: { + scale: 1, + shadowOpacity: 0.30, + shadowRadius: 4.65, + elevation: 8, + backgroundColor: 'rgba(32, 32, 40, 0.50)', + }, + onPressed: { + scale: 1, + shadowOpacity: 0.30, + shadowRadius: 4.65, + elevation: 8, + backgroundColor: 'rgba(16, 16, 20, 0.50)', + }, + Disabled: { + scale: 1, + shadowOpacity: 0.30, + shadowRadius: 4.65, + elevation: 8, + backgroundColor: 'rgba(16, 16, 20, 0.50)', + } + }); + + return ( + { + if (onPress) { + await onPress(); + } + }} + > + + + + {title} + {description} + + {children} + + + ); +}; + +const styles = StyleSheet.create({ + container: { + borderRadius: 8, + backgroundColor: 'rgba(16, 16, 20, 0.50)', + }, + content: { + paddingVertical: 10, + paddingHorizontal: 20, + justifyContent: 'space-between', + alignItems: 'center', + alignSelf: 'stretch', + flexDirection: 'row', + }, + info: { + flexDirection: 'column', + marginHorizontal: 16, + flex: 1, + }, + text: { + color: '#fff', + fontSize: 16, + }, + description: { + color: '#fff', + fontSize: 10, + }, +}); + +export default SettingBase; diff --git a/front/package.json b/front/package.json index 4f8a073..2d7e1f1 100644 --- a/front/package.json +++ b/front/package.json @@ -22,10 +22,10 @@ "@expo/vector-icons": "^13.0.0", "@motiz88/react-native-midi": "^0.0.5", "@react-native-async-storage/async-storage": "~1.17.3", + "@react-native-community/blur": "^4.3.2", "@react-navigation/native": "^6.0.11", "@react-navigation/native-stack": "^6.7.0", "@reduxjs/toolkit": "^1.8.3", - "@shopify/react-native-skia": "^0.1.208", "@tanstack/react-query": "^4.2.3", "@types/jest": "^28.1.4", "@types/react-dom": "~18.0.8", @@ -34,7 +34,6 @@ "add": "^2.0.6", "expo": "^47.0.8", "expo-asset": "~8.7.0", - "expo-blur": "~12.0.1", "expo-dev-client": "~2.0.1", "expo-linear-gradient": "~12.0.1", "expo-linking": "~3.3.1", diff --git a/front/views/SigninView.tsx b/front/views/SigninView.tsx index dd25d9b..b868762 100644 --- a/front/views/SigninView.tsx +++ b/front/views/SigninView.tsx @@ -18,6 +18,7 @@ import { Image, Flex } from 'native-base'; import ImageBanner from '../assets/banner.jpg'; import TMPBase from '../components/UI/TMPBase'; import { LinearGradient } from 'expo-linear-gradient'; +import SettingBase from '../components/UI/SettingsBase'; const hanldeSignin = async ( username: string, @@ -87,6 +88,7 @@ const SigninView = () => { icon='person' title="Menu" /> + coucou or