Finish cleaning up theme stuff
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { StyleSheet, Pressable, PressableProps } from 'react-native';
|
||||
import { ThemedView } from '@/components/theme';
|
||||
import ThemedView from '@/components/theme/default/ThemedView';
|
||||
import { Colors } from '@/constants/Colors';
|
||||
import { useColorScheme } from '@/hooks/useColorScheme';
|
||||
|
||||
@ -24,7 +24,7 @@ const ThemedButton: React.FC<ThemedButtonProps> = ({
|
||||
...restProps // This now includes onPress automatically
|
||||
}) => {
|
||||
const scheme = useColorScheme() ?? 'dark';
|
||||
|
||||
|
||||
return (
|
||||
<ThemedView
|
||||
style={[
|
||||
@ -37,12 +37,7 @@ const ThemedButton: React.FC<ThemedButtonProps> = ({
|
||||
]}
|
||||
>
|
||||
<Pressable
|
||||
style={[
|
||||
styles.button,
|
||||
{ backgroundColor: Colors[scheme].text },
|
||||
buttonStyle,
|
||||
style,
|
||||
]}
|
||||
style={[styles.button, { backgroundColor: Colors[scheme].text }, buttonStyle, style]}
|
||||
{...restProps} // This passes onPress and all other Pressable props
|
||||
>
|
||||
{children}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { TextStyle, PressableProps } from 'react-native';
|
||||
import { ThemedButton, ThemedText } from '@/components/theme';
|
||||
import ThemedButton from '@/components/theme/buttons/ThemedButton';
|
||||
import ThemedText from '@/components/theme/default/ThemedText';
|
||||
import { Colors } from '@/constants/Colors';
|
||||
import { useColorScheme } from '@/hooks/useColorScheme';
|
||||
|
||||
@ -28,10 +29,10 @@ const ThemedTextButton: React.FC<ThemedTextButtonProps> = ({
|
||||
...restProps // This includes onPress and all other Pressable props
|
||||
}) => {
|
||||
const scheme = useColorScheme() ?? 'dark';
|
||||
|
||||
|
||||
return (
|
||||
<ThemedButton
|
||||
width={width}
|
||||
<ThemedButton
|
||||
width={width}
|
||||
height={height}
|
||||
containerStyle={containerStyle}
|
||||
buttonStyle={buttonStyle}
|
||||
|
Reference in New Issue
Block a user