diff --git a/src/components/button/index.tsx b/src/components/button/index.tsx index e1ad810e..67cc6ec5 100644 --- a/src/components/button/index.tsx +++ b/src/components/button/index.tsx @@ -1,11 +1,9 @@ -import React, { FC } from 'react'; -import { ActivityIndicator, StyleSheet, Text, View } from 'react-native'; -import { RectButton } from 'react-native-gesture-handler'; +import { FC } from 'react'; +import { StyleSheet, TouchableNativeFeedback, View } from 'react-native'; +import { Button as RNEButton } from 'react-native-elements'; import { ButtonProps } from '@/components/button/type'; - import useVisualScheme from '@/store/visualScheme'; - import { commonColors } from '@/styles/common'; const Button: FC = ({ @@ -16,29 +14,31 @@ const Button: FC = ({ children, }) => { const currentStyle = useVisualScheme(state => state.currentStyle); + const btnGlobalStyle = currentStyle?.button_style ?? {}; + const textGlobalStyle = currentStyle?.button_text_style ?? {}; + const ripplePurple = commonColors.lightPurple ?? '#B8A6F5'; + return ( - { - if (!isLoading) onPress?.(...props); - }} + onPress?.(true)} > - - {isLoading && ( - // 加载指示器 - )} - - {children} - + + - + ); }; @@ -49,10 +49,9 @@ const styles = StyleSheet.create({ overflow: 'hidden', }, button: { - flex: 1, + flexDirection: 'row', alignItems: 'center', justifyContent: 'center', - flexDirection: 'row', borderRadius: 6, }, });